|
| 1 | +name: Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v[0-9]+\\.[0-9]+\\.[0-9]+.*" |
| 7 | + pull_request: |
| 8 | + branches: ["main"] |
| 9 | + |
| 10 | +jobs: |
| 11 | + build_alioth: |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - target: x86_64-unknown-linux-gnu |
| 16 | + os: ubuntu-latest |
| 17 | + - target: aarch64-unknown-linux-gnu |
| 18 | + os: ubuntu-24.04-arm |
| 19 | + - target: aarch64-apple-darwin |
| 20 | + os: macos-latest |
| 21 | + runs-on: ${{ matrix.os }} |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 24 | + - uses: dtolnay/rust-toolchain@stable |
| 25 | + - name: Build |
| 26 | + run: RUSTFLAGS='-C target-feature=+crt-static' cargo +stable build --target ${{ matrix.target }} --release |
| 27 | + - name: Upload artifact |
| 28 | + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
| 29 | + with: |
| 30 | + name: alioth-${{ matrix.target }} |
| 31 | + path: target/${{ matrix.target }}/release/alioth |
| 32 | + |
| 33 | + build_bootloader: |
| 34 | + uses: ./.github/workflows/bootloader.yml |
| 35 | + |
| 36 | + create_release: |
| 37 | + needs: [build_alioth, build_bootloader] |
| 38 | + runs-on: ubuntu-latest |
| 39 | + permissions: |
| 40 | + contents: write |
| 41 | + steps: |
| 42 | + - name: Download all artifacts |
| 43 | + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
| 44 | + with: |
| 45 | + path: artifacts |
| 46 | + - name: Create tarballs |
| 47 | + run: | |
| 48 | + tar -cvJf alioth-linux-x86_64.tar.xz \ |
| 49 | + -C $PWD/artifacts/alioth-x86_64-unknown-linux-gnu alioth \ |
| 50 | + -C $PWD/artifacts/bootloader-x86_64 kernel-x86_64 |
| 51 | + tar -cvJf alioth-linux-aarch64.tar.xz \ |
| 52 | + -C $PWD/artifacts/alioth-aarch64-unknown-linux-gnu alioth \ |
| 53 | + -C $PWD/artifacts/bootloader-aarch64 kernel-aarch64 |
| 54 | + tar -cvJf alioth-macos-aarch64.tar.xz \ |
| 55 | + -C $PWD/artifacts/alioth-aarch64-apple-darwin alioth \ |
| 56 | + -C $PWD/artifacts/bootloader-aarch64 kernel-aarch64 |
| 57 | + - name: Upload artifact |
| 58 | + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
| 59 | + with: |
| 60 | + name: release-artifacts |
| 61 | + path: alioth-*-*.tar.xz |
| 62 | + # - name: Create Release |
| 63 | + # uses: softprops/action-gh-release@v2 |
| 64 | + # with: |
| 65 | + # files: alioth-*-*.tar.xz |
| 66 | + # fail_on_unmatched_files: true |
0 commit comments