Merge pull request #1 from spinupdev/codex/vfio-device-allowlist #9
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 | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| target: x86_64-unknown-linux-musl | |
| - runner: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-musl | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.85.0 | |
| with: | |
| targets: ${{ matrix.target }} | |
| - run: cargo test --all-features --locked | |
| - run: cargo build --release --locked --target ${{ matrix.target }} | |
| - name: package release asset | |
| run: | | |
| mkdir dist | |
| cp target/${{ matrix.target }}/release/cloud-hypervisor-jailer dist/ | |
| tar -C dist -czf cloud-hypervisor-jailer-${{ matrix.target }}.tar.gz cloud-hypervisor-jailer | |
| sha256sum cloud-hypervisor-jailer-${{ matrix.target }}.tar.gz > cloud-hypervisor-jailer-${{ matrix.target }}.tar.gz.sha256 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ matrix.target }} | |
| path: | | |
| cloud-hypervisor-jailer-${{ matrix.target }}.tar.gz | |
| cloud-hypervisor-jailer-${{ matrix.target }}.tar.gz.sha256 | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: release-* | |
| merge-multiple: true | |
| - name: publish GitHub release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "$GITHUB_REF_NAME" \ | |
| --title "$GITHUB_REF_NAME" \ | |
| --generate-notes \ | |
| ./*.tar.gz \ | |
| ./*.tar.gz.sha256 |