Kir-Antipov / mc-publish

🚀 Your one-stop GitHub Action for seamless Minecraft project publication across various platforms.
MIT License
228 stars 20 forks source link

Generating changelogs for GitHub doesn't seem to work #77

Closed Hendrix-Shen closed 8 months ago

Hendrix-Shen commented 1 year ago

I tested almost the same configuration on 3.2 and 3.3 (except for the files field) and it worked fine in 3.2, but 3.3 did not generate "Full Changelog: xxx...xxx"

My test workflow config:

      ...
      - name: Publish
        uses: Kir-Antipov/mc-publish@v3.3
        with:
          files: README.md
          github-changelog: |
            **This version is automatically released by CI Build**

            Latest commit log:

            - ${{ github.event.head_commit.message }}
          github-generate-changelog: true
          github-prerelease: true
          github-commitish: ${{ github.event.ref }}
          github-tag: dev-${{ github.run_number }}
          github-token: ${{ secrets.GITHUB_TOKEN }}

Did I do something wrong?

Kir-Antipov commented 1 year ago

Hm, that's interesting. With a quick glance over the code, I do not see where I could screw up with v3.3. Are you sure that the release in question was not created before mc-publish could put its virtual hands on it?

Hendrix-Shen commented 1 year ago

Yes,

When I switched to 3.2, GitHub generated changelogs: Commit#ffbc4b4 Release#dev-20 But when I switched to 3.3, the logs no longer generated: Commit#e8742e2 Release#dev-21

Kir-Antipov commented 1 year ago

I will look into this shortly.

Kir-Antipov commented 1 year ago

I've finally tracked down the root of this problem. The generated changelog is indeed being appended to the original one as intended. However, I inadvertently override the updated version with the original one in the subsequent steps:

https://github.com/Kir-Antipov/mc-publish/blob/69d94c54c333ce6df545827ddfdd3ecb7f1ac8b8/src/platforms/github/github-uploader.ts#L130-L135

Should be an easy one to fix!