|
92 | 92 | id-token: write |
93 | 93 | attestations: write |
94 | 94 | artifact-metadata: write |
| 95 | + outputs: |
| 96 | + dmg_sha256: ${{ steps.dmg_sha.outputs.sha }} |
95 | 97 | strategy: |
96 | 98 | fail-fast: false |
97 | 99 | matrix: |
@@ -231,6 +233,18 @@ jobs: |
231 | 233 | gh release upload "$TAG" "$path" --clobber |
232 | 234 | done |
233 | 235 |
|
| 236 | + - name: Compute DMG checksum |
| 237 | + id: dmg_sha |
| 238 | + if: ${{ matrix.name == 'macOS' }} |
| 239 | + shell: bash |
| 240 | + env: |
| 241 | + BUNDLE_PATH: ${{ matrix.bundle_path }} |
| 242 | + run: | |
| 243 | + DMG="$(find "$BUNDLE_PATH" -name "Sable-${VERSION}-macos-universal.dmg" -type f | head -1)" |
| 244 | + [ -n "$DMG" ] || { echo "DMG not found in $BUNDLE_PATH" >&2; exit 1; } |
| 245 | + SHA="$(sha256sum "$DMG" | awk '{print $1}')" |
| 246 | + echo "sha=$SHA" >> "$GITHUB_OUTPUT" |
| 247 | +
|
234 | 248 | android: |
235 | 249 | name: Build Android |
236 | 250 | needs: setup-release |
@@ -656,6 +670,7 @@ jobs: |
656 | 670 | for f in .goreleaser-dist/Sable-*.deb \ |
657 | 671 | .goreleaser-dist/Sable-*.rpm \ |
658 | 672 | .goreleaser-dist/Sable-*.pkg.tar.zst \ |
| 673 | + .goreleaser-dist/Sable-*-linux-x86_64.tar.gz \ |
659 | 674 | src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage \ |
660 | 675 | src-tauri/target/release/bundle/appimage/Sable-*-linux-x86_64.AppImage.sig; do |
661 | 676 | [ -e "$f" ] || continue |
@@ -789,14 +804,13 @@ jobs: |
789 | 804 | with: |
790 | 805 | persist-credentials: false |
791 | 806 |
|
792 | | - - name: Compute the DMG checksum |
| 807 | + - name: Resolve DMG checksum |
793 | 808 | shell: bash |
794 | 809 | env: |
795 | | - GH_TOKEN: ${{ github.token }} |
| 810 | + DMG_SHA256: ${{ needs.build.outputs.dmg_sha256 }} |
796 | 811 | run: | |
797 | | - DMG="Sable-${VERSION}-macos-universal.dmg" |
798 | | - gh release download "$TAG" --repo "$GITHUB_REPOSITORY" --pattern "$DMG" --dir dmg |
799 | | - echo "SHA256=$(sha256sum "dmg/$DMG" | awk '{print $1}')" >> "$GITHUB_ENV" |
| 812 | + [ -n "${DMG_SHA256:-}" ] || { echo "DMG sha256 is empty" >&2; exit 1; } |
| 813 | + echo "SHA256=$DMG_SHA256" >> "$GITHUB_ENV" |
800 | 814 |
|
801 | 815 | - name: Push the cask to the tap |
802 | 816 | shell: bash |
|
0 commit comments