From 932cb225d3bcbfe15f8f843feea970012927abaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Sun, 3 Dec 2023 21:17:49 +0100 Subject: [PATCH] Don't try to publish artifacts on RC GitHub releases (#8733) --- .github/workflows/publish-release-artifact.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release-artifact.yml b/.github/workflows/publish-release-artifact.yml index 16c26da0e7a4..86d55282ebba 100644 --- a/.github/workflows/publish-release-artifact.yml +++ b/.github/workflows/publish-release-artifact.yml @@ -13,6 +13,7 @@ jobs: outputs: project-version: ${{ steps.set-version.outputs.project-version }} is-lts: ${{ steps.set-version.outputs.is-lts }} + is-rc: ${{ steps.set-version.outputs.is-rc }} steps: - uses: actions/checkout@v4 - name: Set up JDK 11 @@ -34,16 +35,23 @@ jobs: is_lts=false fi - echo "Version is $version, is_lts: $is_lts" + is_rc=false + if [[ ${version} == *"-SNAPSHOT" ]]; then + is_rc=true + fi + + echo "Version is $version, is_lts: $is_lts, is_rc: $is_rc" echo "is-lts=${is_lts}" >> $GITHUB_OUTPUT echo "project-version=$version" >> $GITHUB_OUTPUT + echo "is-rc=${is_rc}" >> $GITHUB_OUTPUT war: permissions: contents: write # to upload release asset (softprops/action-gh-release) runs-on: ubuntu-latest needs: determine-version + if: ${{ needs.determine-version.outputs.is-rc == 'false' }} steps: - name: Fetch war id: fetch-war @@ -76,6 +84,7 @@ jobs: runs-on: ubuntu-latest needs: determine-version + if: ${{ needs.determine-version.outputs.is-rc == 'false' }} steps: - name: Fetch Deb id: fetch-deb @@ -110,6 +119,7 @@ jobs: runs-on: ubuntu-latest needs: determine-version + if: ${{ needs.determine-version.outputs.is-rc == 'false' }} steps: - name: Fetch RPM id: fetch-rpm @@ -145,6 +155,7 @@ jobs: runs-on: ubuntu-latest needs: determine-version + if: ${{ needs.determine-version.outputs.is-rc == 'false' }} steps: - name: Fetch MSI id: fetch-msi @@ -180,6 +191,7 @@ jobs: runs-on: ubuntu-latest needs: determine-version + if: ${{ needs.determine-version.outputs.is-rc == 'false' }} steps: - name: Fetch suse rpm id: fetch-suse-rpm