From 707b77db2e5a061c951fd84a63e4614ae05f9327 Mon Sep 17 00:00:00 2001 From: tremblap Date: Wed, 22 Feb 2023 10:55:45 +0000 Subject: [PATCH 1/5] 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 2/5] 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 3/5] 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 4/5] 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 5/5] 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