Skip to content

Commit

Permalink
Don't try to publish artifacts on RC GitHub releases (#8733)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve authored Dec 3, 2023
1 parent 78f1e9c commit 932cb22
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/publish-release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 932cb22

Please sign in to comment.