From fb3b989f46517291d2c8d816c5b1cb0b4272263e Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 21 Feb 2023 12:47:16 +0000 Subject: [PATCH 1/7] replace `set-output` with environment file --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5859ca6..6fa876c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,7 +72,7 @@ jobs: - run: ls -r - id: get-version - run: echo "::set-output name=version::$(cat flucoma.version.rc)" + run: echo "version=$(cat flucoma.version.rc)" >> $GITHUB_OUTPUT working-directory: build/_deps/flucoma-core-src release: From 26cad15ccb5fd433af1a1dcf893f5a5e35749709 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Tue, 21 Feb 2023 18:10:49 +0000 Subject: [PATCH 2/7] release workflow: use invoked branch name to pull from --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6fa876c..211ecf2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/cli@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: compress archive run: 7z a FluCoMa-CLI-Windows.zip FluidCorpusManipulation @@ -28,7 +28,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/cli@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: sign binaries uses: flucoma/actions/distribution@main @@ -58,7 +58,7 @@ jobs: - uses: flucoma/actions/env@main - uses: flucoma/actions/cli@main with: - branch: origin/production + branch: origin/${{ github.ref_name }} - name: compress archive run: tar -zcvf FluCoMa-CLI-Linux.tar.gz FluidCorpusManipulation From 707b77db2e5a061c951fd84a63e4614ae05f9327 Mon Sep 17 00:00:00 2001 From: tremblap Date: Wed, 22 Feb 2023 10:55:45 +0000 Subject: [PATCH 3/7] Tag release to correct commit --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 211ecf2..f0f04d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,4 +101,5 @@ jobs: files: FluCoMa* prerelease: true tag_name: ${{ needs.linux.outputs.version }} + target_commitish: ${{ github.sha }} draft: false From 4ca7706289a43b7cb120435b873f8fda92b2ff40 Mon Sep 17 00:00:00 2001 From: tremblap Date: Wed, 22 Feb 2023 11:47:47 +0000 Subject: [PATCH 4/7] deleting the previous release with the same tag --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0f04d4..92ff350 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -93,6 +93,15 @@ jobs: name: winbuild #### UPLOAD RELEASE #### + + - name: delete pre-existing release + uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const { owner, repo } = context.repo + await github.rest.git.deleteRef({ owner, repo, ref: needs.linux.outputs.version }) + - name: package and upload uses: softprops/action-gh-release@v1 with: From 1d2b824f80e46707cf0175a736ca7ae611b37eac Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 12:15:29 +0000 Subject: [PATCH 5/7] release: passing data to gh-script --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92ff350..a6c7a01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,11 +96,13 @@ jobs: - name: delete pre-existing release uses: actions/github-script@v5 + env: + DATA: ${{ needs.linux.outputs.version }} with: github-token: ${{secrets.GITHUB_TOKEN}} script: | const { owner, repo } = context.repo - await github.rest.git.deleteRef({ owner, repo, ref: needs.linux.outputs.version }) + await github.rest.git.deleteRef({ owner, repo, ref: process.env.DATA }) - name: package and upload uses: softprops/action-gh-release@v1 From 0b6a2585f1f0ba08387a32a50a2e4371af087f12 Mon Sep 17 00:00:00 2001 From: Owen Green Date: Wed, 22 Feb 2023 12:46:11 +0000 Subject: [PATCH 6/7] release: try again to zap pre-existing --- .github/workflows/release.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a6c7a01..3ccc335 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,14 +95,12 @@ jobs: #### UPLOAD RELEASE #### - name: delete pre-existing release - uses: actions/github-script@v5 - env: - DATA: ${{ needs.linux.outputs.version }} + uses: dev-drprasad/delete-tag-and-release@v0.2.0 with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const { owner, repo } = context.repo - await github.rest.git.deleteRef({ owner, repo, ref: process.env.DATA }) + delete_release: true # default: false + tag_name: ${{ needs.linux.outputs.version }} # tag name to delete + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: package and upload uses: softprops/action-gh-release@v1 From 722f817f23af7790e7d00dd72e908d1c717461c8 Mon Sep 17 00:00:00 2001 From: tremblap Date: Tue, 28 Mar 2023 14:06:32 +0100 Subject: [PATCH 7/7] amended script tag management version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ccc335..6ce4e06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,7 +95,7 @@ jobs: #### UPLOAD RELEASE #### - name: delete pre-existing release - uses: dev-drprasad/delete-tag-and-release@v0.2.0 + uses: dev-drprasad/delete-tag-and-release@v0.2.1 with: delete_release: true # default: false tag_name: ${{ needs.linux.outputs.version }} # tag name to delete