Release Artifacts #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Artifacts | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-swift-binaries: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Build macOS release package | |
| run: | | |
| chmod +x albator-swift/build_release_binaries.sh | |
| cd albator-swift | |
| ./build_release_binaries.sh "${GITHUB_REF_NAME}" "../release" | |
| - name: Upload binary release artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: albator-swift-arm64-${{ github.ref_name }} | |
| path: | | |
| release/albator-swift-${{ github.ref_name }}-macos-arm64.tar.gz | |
| release/albator-swift-${{ github.ref_name }}-macos-arm64.tar.gz.sha256 | |
| build-source-archive: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create source tarball | |
| run: | | |
| git archive --format=tar.gz --output albator-${GITHUB_REF_NAME}.tar.gz HEAD | |
| - name: Generate checksums | |
| run: | | |
| sha256sum albator-${GITHUB_REF_NAME}.tar.gz > albator-${GITHUB_REF_NAME}.sha256 | |
| - name: Upload source release artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: albator-source-${{ github.ref_name }} | |
| path: | | |
| albator-${{ github.ref_name }}.tar.gz | |
| albator-${{ github.ref_name }}.sha256 | |
| publish-release: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-swift-binaries | |
| - build-source-archive | |
| steps: | |
| - name: Download all release artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release | |
| - name: Collect files | |
| run: | | |
| find release -type f -maxdepth 3 | sort | |
| - name: Publish GitHub release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| release/**/*.tar.gz | |
| release/**/*.sha256 |