|
| 1 | +# See: https://docs.github.com/en/actions/writing-workflows |
| 2 | +--- |
| 3 | +name: Release |
| 4 | + |
| 5 | +# Trigger on any tag creation: |
| 6 | +on: |
| 7 | + push: |
| 8 | + tags: |
| 9 | + - "*" |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + strategy: |
| 14 | + fail-fast: true |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - os: ubuntu-latest |
| 18 | + artifact: linux-x86-gnu |
| 19 | + target: x86_64-unknown-linux-gnu |
| 20 | + use-zigbuild: true |
| 21 | + glibc-version: 2.28 |
| 22 | + - os: ubuntu-latest |
| 23 | + artifact: linux-arm-gnu |
| 24 | + target: aarch64-unknown-linux-gnu |
| 25 | + use-zigbuild: true |
| 26 | + glibc-version: 2.28 |
| 27 | + - os: ubuntu-latest |
| 28 | + artifact: linux-x86-musl |
| 29 | + target: x86_64-unknown-linux-musl |
| 30 | + use-zigbuild: true |
| 31 | + - os: ubuntu-latest |
| 32 | + artifact: linux-arm-musl |
| 33 | + target: aarch64-unknown-linux-musl |
| 34 | + use-zigbuild: true |
| 35 | + - os: macos-13 |
| 36 | + artifact: macos-x86 |
| 37 | + target: x86_64-apple-darwin |
| 38 | + - os: macos-15 |
| 39 | + artifact: macos-arm |
| 40 | + target: aarch64-apple-darwin |
| 41 | + - os: ubuntu-latest |
| 42 | + artifact: windows-x64 |
| 43 | + target: x86_64-pc-windows-gnu |
| 44 | + extension: exe |
| 45 | + name: Build ${{ matrix.artifact }} |
| 46 | + runs-on: ${{ matrix.os }} |
| 47 | + continue-on-error: false |
| 48 | + steps: |
| 49 | + - name: Build |
| 50 | + uses: asimov-platform/build-rust-action@v5 |
| 51 | + with: |
| 52 | + target: ${{ matrix.target }} |
| 53 | + artifact-suffix: ${{ matrix.artifact }} |
| 54 | + binary-extension: ${{ matrix.extension }} |
| 55 | + use-zigbuild: ${{ matrix.use-zigbuild || 'false' }} |
| 56 | + glibc-version: ${{ matrix.glibc-version }} |
| 57 | + rust-toolchain: 1.85.0 |
| 58 | + |
| 59 | + release: |
| 60 | + name: Release |
| 61 | + if: startsWith(github.ref, 'refs/tags/') |
| 62 | + needs: build |
| 63 | + runs-on: ubuntu-latest |
| 64 | + permissions: |
| 65 | + contents: write |
| 66 | + outputs: |
| 67 | + assets: ${{ steps.release.outputs.assets }} |
| 68 | + steps: |
| 69 | + - name: Release |
| 70 | + id: release |
| 71 | + uses: asimov-platform/release-action@v3 |
| 72 | + with: |
| 73 | + app_id: ${{ secrets.ASIMOV_APP_ID }} |
| 74 | + app_private_key: ${{ secrets.ASIMOV_APP_PRIVATE_KEY }} |
| 75 | + changelog-path: CHANGES.md |
| 76 | + |
| 77 | + tweet-release: |
| 78 | + name: Tweet release |
| 79 | + needs: release |
| 80 | + uses: asimov-modules/.github/.github/workflows/tweet.yaml@master |
| 81 | + with: |
| 82 | + message: | |
| 83 | + 📦 ${{ github.event.repository.name }} ${{ github.ref_name }} has been released: |
| 84 | + ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }} |
| 85 | + secrets: inherit |
| 86 | + |
| 87 | + update-scoop-bucket: |
| 88 | + name: Update Scoop bucket |
| 89 | + needs: release |
| 90 | + uses: asimov-modules/.github/.github/workflows/update-scoop-bucket.yaml@master |
| 91 | + with: |
| 92 | + version: ${{ github.ref_name }} |
| 93 | + assets: ${{ needs.release.outputs.assets }} |
| 94 | + secrets: inherit |
0 commit comments