From 4a1f18aada376397b76abccfff2aaa6c9e99e438 Mon Sep 17 00:00:00 2001 From: Thomas De Meyer Date: Tue, 14 Nov 2023 08:49:41 +0100 Subject: [PATCH] fix: upgraded changie action version, fixed changelog body issue --- action.yaml | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/action.yaml b/action.yaml index d3f18af..e10f662 100644 --- a/action.yaml +++ b/action.yaml @@ -54,7 +54,7 @@ runs: - name: Output changes if: steps.status.outputs.create_release == 'true' - uses: miniscruff/changie-action@5c210bdd35a94db41b37513e3e7c2b4dc1e7a4e9 # v1.0.1 + uses: miniscruff/changie-action@v2 id: changelog with: version: latest @@ -62,14 +62,14 @@ runs: - name: Batch changes if: steps.status.outputs.create_release == 'true' - uses: miniscruff/changie-action@5c210bdd35a94db41b37513e3e7c2b4dc1e7a4e9 # v1.0.1 + uses: miniscruff/changie-action@v2 with: version: latest args: batch auto - name: Merge changes if: steps.status.outputs.create_release == 'true' - uses: miniscruff/changie-action@5c210bdd35a94db41b37513e3e7c2b4dc1e7a4e9 # v1.0.1 + uses: miniscruff/changie-action@v2 with: version: latest args: merge @@ -77,7 +77,7 @@ runs: - name: Get the latest version id: latest if: steps.status.outputs.create_release == 'true' || steps.status.outputs.is_release == 'true' - uses: miniscruff/changie-action@5c210bdd35a94db41b37513e3e7c2b4dc1e7a4e9 # v1.0.1 + uses: miniscruff/changie-action@v2 with: version: latest args: latest @@ -107,35 +107,23 @@ runs: if: steps.status.outputs.is_release == 'true' uses: actions/github-script@v6 env: - version: ${{ steps.latest.outputs.output }} + VERSION: ${{ steps.latest.outputs.output }} with: github-token: ${{ inputs.github-token }} script: | github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: `refs/tags/${process.env.version}`, + ref: `refs/tags/${process.env.VERSION}`, sha: context.sha }) - - name: Create release notes - if: steps.status.outputs.is_release == 'true' - shell: bash - id: release-notes - run: | - BODY=$(cat .changes/${{ steps.latest.outputs.output }}.md | sed -n '1!p') - - EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - echo "body<<$EOF" >> $GITHUB_OUTPUT - echo "$BODY" >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT - - name: Create GitHub release - if: steps.status.outputs.is_release == 'true' +# if: steps.status.outputs.is_release == 'true' uses: actions/github-script@v6 env: - version: ${{ steps.latest.outputs.output }} - GITHUB_RELEASE_BODY: ${{ steps.release-notes.outputs.body }} + VERSION: ${{ steps.latest.outputs.output }} + GITHUB_RELEASE_BODY: ${{ steps.changelog.outputs.output }} with: github-token: ${{ inputs.github-token }} retries: 3 @@ -143,9 +131,9 @@ runs: github.rest.repos.createRelease({ owner: context.repo.owner, repo: context.repo.repo, - name: process.env.version, + name: process.env.VERSION, body: process.env.GITHUB_RELEASE_BODY, - tag_name: process.env.version, + tag_name: process.env.VERSION, draft: false, })