Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SHA256 checksum to GitHub release #675

Merged
merged 3 commits into from
May 1, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/publish-release-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,17 @@ jobs:
PROJECT_VERSION=${{ steps.set-version.outputs.project-version }}
echo $PROJECT_VERSION
echo "file-name=$FILE_NAME" >> $GITHUB_OUTPUT
SHA256SUM=$(curl -fsSL https://repo.jenkins-ci.org/api/storage/releases/$GROUP_ID/$ARTIFACT_ID/$PROJECT_VERSION/$ARTIFACT_ID-$PROJECT_VERSION.jar.sha256)
basil marked this conversation as resolved.
Show resolved Hide resolved
echo "${SHA256SUM} $FILE_NAME-$PROJECT_VERSION.jar" >$FILE_NAME-$PROJECT_VERSION.jar.sha256
wget -q https://repo.jenkins-ci.org/releases/$GROUP_ID/$ARTIFACT_ID/$PROJECT_VERSION/$ARTIFACT_ID-$PROJECT_VERSION.jar \
-O $FILE_NAME-$PROJECT_VERSION.jar
-O $FILE_NAME-$PROJECT_VERSION.jar \
&& sha256sum -c --strict $FILE_NAME-$PROJECT_VERSION.jar.sha256
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.set-version.outputs.project-version }} ./${{ steps.fetch-artifact.outputs.file-name }}-${{ steps.set-version.outputs.project-version }}.jar
with:
files: |
${{ steps.fetch-artifact.outputs.file-name }}-${{ steps.set-version.outputs.project-version }}.jar
${{ steps.fetch-artifact.outputs.file-name }}-${{ steps.set-version.outputs.project-version }}.jar.sha256
Loading