fix: stage kernel/rootfs into jailer chroot before configuring VM #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 | |
| on: | |
| push: | |
| tags: ["v*"] | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| BINARY: fc-cli | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.target }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| asset: fc-cli-linux-x86_64 | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| asset: fc-cli-linux-aarch64 | |
| - target: x86_64-apple-darwin | |
| runner: macos-latest | |
| asset: fc-cli-darwin-x86_64 | |
| - target: aarch64-apple-darwin | |
| runner: macos-latest | |
| asset: fc-cli-darwin-aarch64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| # Cross-compilation toolchain for aarch64-linux on x86_64 runner | |
| - name: Install cross-compilation tools | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| env: | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
| run: cargo build --release --package fc-cli --target ${{ matrix.target }} | |
| - name: Package | |
| run: | | |
| cp target/${{ matrix.target }}/release/${{ env.BINARY }} ${{ matrix.asset }} | |
| chmod +x ${{ matrix.asset }} | |
| tar czf ${{ matrix.asset }}.tar.gz ${{ matrix.asset }} | |
| sha256sum ${{ matrix.asset }}.tar.gz > ${{ matrix.asset }}.tar.gz.sha256 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.asset }} | |
| path: | | |
| ${{ matrix.asset }}.tar.gz | |
| ${{ matrix.asset }}.tar.gz.sha256 | |
| release: | |
| name: Publish Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Create GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| gh release create "${{ github.ref_name }}" \ | |
| --title "${{ github.ref_name }}" \ | |
| --generate-notes \ | |
| artifacts/* | |
| publish-crates: | |
| name: Publish to crates.io | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: | | |
| cargo publish --package fc-api | |
| sleep 30 | |
| cargo publish --package fc-sdk | |
| sleep 30 | |
| cargo publish --package firecracker | |
| sleep 30 | |
| cargo publish --package fc-cli |