Skip to content

Commit

Permalink
ci: add checksum upload release to new job
Browse files Browse the repository at this point in the history
Signed-off-by: Han Gao <[email protected]>
  • Loading branch information
RevySR committed Mar 24, 2024
1 parent c0c57b7 commit 8198175
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,47 @@ jobs:
mkimg-th1520/SHA256SUMS
mkimg-th1520/SHA512SUMS
- name: 'Create release by tag'
uses: softprops/action-gh-release@v1
- name: 'Upload Release'
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
mkimg-th1520/*.zst
mkimg-th1520/SHA256SUMS
mkimg-th1520/SHA512SUMS
token: ${{ secrets.GITHUB_TOKEN }}

upload_checksum:
needs: mkrootfs
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-22.04
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: true
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Download Built Artifacts
uses: actions/download-artifact@v2

- name: Make Checksum file
run: |
find . -name "*.zst" | xargs -I{} mv -v {} .
sha256sum *.zst > SHA256SUMS
sha512sum *.zst > SHA512SUMS
- name: 'Upload checksum'
uses: softprops/action-gh-release@v2
with:
files: |
SHA256SUMS
SHA512SUMS
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8198175

Please sign in to comment.