From f49bd44cc1b704927cee8a00b8380f1488430e16 Mon Sep 17 00:00:00 2001 From: reggie Date: Sun, 6 Oct 2024 00:39:34 -0500 Subject: [PATCH] Guarantee that releases are only set as latest after [release, macos_release] finish --- .github/workflows/release.yml | 37 ++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5924ffb9..80219ba4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: tag: ${{ steps.version_info.outputs.build_version }} draft: "true" omitBody: true - omitBodyDuringUpdate: true + #omitBodyDuringUpdate: true #owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }} #repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }} token: ${{ secrets.GITHUB_TOKEN }} @@ -137,11 +137,11 @@ jobs: uses: ncipollo/release-action@v1 with: name: ${{ steps.version_info.outputs.build_version }} - artifacts: "release_output/*.tar.gz,release_output/*.zip" tag: ${{ steps.version_info.outputs.build_version }} + artifacts: "release_output/*.tar.gz,release_output/*.zip" draft: "true" omitBody: true - omitBodyDuringUpdate: true + #omitBodyDuringUpdate: true allowUpdates: true replacesArtifacts: true #owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }} @@ -181,6 +181,7 @@ jobs: run: | echo "build_version=r.`echo ${{ github.sha }} | cut -c1-7`" >> $GITHUB_OUTPUT echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT + shell: bash - name: Configure for release run: | @@ -204,14 +205,36 @@ jobs: uses: ncipollo/release-action@v1 with: name: ${{ steps.version_info.outputs.build_version }} - artifacts: "publish_ava/*.tar.gz, publish_headless/*.tar.gz" tag: ${{ steps.version_info.outputs.build_version }} - draft: "false" - makeLatest: "true" + artifacts: "publish_ava/*.tar.gz, publish_headless/*.tar.gz" + draft: "true" omitBody: true - omitBodyDuringUpdate: true + #omitBodyDuringUpdate: true allowUpdates: true replacesArtifacts: true #owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }} #repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }} token: ${{ secrets.GITHUB_TOKEN }} + + set_latest_release: + name: Set as latest release + runs-on: ubuntu-latest + needs: [release, macos_release] + steps: + - name: Get version info + id: version_info + run: | + echo "build_version=r.`echo ${{ github.sha }} | cut -c1-7`" >> $GITHUB_OUTPUT + shell: bash + + - name: Update release + uses: ncipollo/release-action@v1 + with: + name: ${{ steps.version_info.outputs.build_version }} + tag: ${{ steps.version_info.outputs.build_version }} + makeLatest: "true" + omitBody: true + allowUpdates: true + #owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }} + #repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }} + token: ${{ secrets.GITHUB_TOKEN }}