Skip to content

Commit

Permalink
[Backport stable/8.5] fix: download/upload release artifacts from sep…
Browse files Browse the repository at this point in the history
…arate directory (#19047)

# Description
Backport of #19039 to `stable/8.5`.

relates to
original author: @ThorbenLindhauer
  • Loading branch information
korthout committed Jun 4, 2024
2 parents ccfb650 + c4b8287 commit 0d12c97
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions .github/workflows/zeebe-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,32 +210,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Download Release Artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts-${{ inputs.releaseVersion }}
- name: Create Artifact Checksums
id: checksum
run: |
for filename in *; do
checksumFile="${filename}.sha1sum"
sha1sum "${filename}" > "${checksumFile}"
sha1sumResult=$?
if [ ! -f "${checksumFile}" ]; then
echo "Failed to created checksum of ${filename} at ${checksumFile}; [sha1sum] exited with result ${sha1sumResult}. Check the logs for errors."
exit 1
fi
done
- name: Determine if Pre-Release
id: pre-release
run: |
shopt -s nocasematch # set matching to case insensitive
PRE_RELEASE=false
if [[ "${RELEASE_VERSION}" =~ ^.*-(alpha|rc|SNAPSHOT)[\d]*$ ]]; then
PRE_RELEASE=true
fi
shopt -u nocasematch # reset it
echo "result=${PRE_RELEASE}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_BRANCH }}
Expand Down Expand Up @@ -301,12 +275,40 @@ jobs:
# To show the changelog also as step summary
echo "$changelog" >> $GITHUB_STEP_SUMMARY
- name: Download Release Artifacts
uses: actions/download-artifact@v4
with:
name: release-artifacts-${{ inputs.releaseVersion }}
path: release-artifacts
- name: Create Artifact Checksums
id: checksum
working-directory: ./release-artifacts
run: |
for filename in *; do
checksumFile="${filename}.sha1sum"
sha1sum "${filename}" > "${checksumFile}"
sha1sumResult=$?
if [ ! -f "${checksumFile}" ]; then
echo "Failed to created checksum of ${filename} at ${checksumFile}; [sha1sum] exited with result ${sha1sumResult}. Check the logs for errors."
exit 1
fi
done
- name: Determine if Pre-Release
id: pre-release
run: |
shopt -s nocasematch # set matching to case insensitive
PRE_RELEASE=false
if [[ "${RELEASE_VERSION}" =~ ^.*-(alpha|rc|SNAPSHOT)[\d]*$ ]]; then
PRE_RELEASE=true
fi
shopt -u nocasematch # reset it
echo "result=${PRE_RELEASE}" >> $GITHUB_OUTPUT
- name: Create Github release
uses: ncipollo/release-action@v1
if: ${{ inputs.dryRun == false }}
with:
name: ${{ inputs.releaseVersion }}
artifacts: "*"
artifacts: "release-artifacts/*"
artifactErrorsFailBuild: true
draft: true
body: ${{ steps.gen-changelog.outputs.changelog }}
Expand Down

0 comments on commit 0d12c97

Please sign in to comment.