Create a new Release #9
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: Create a new Release | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: build-vmlinux | |
| cancel-in-progress: false | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.gen.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0 | |
| with: | |
| babashka-version: 1.12.218 | |
| - name: Generate build matrix from manifest.clj | |
| id: gen | |
| run: | | |
| set -euo pipefail | |
| matrix="$(bb gha-matrix-json)" | |
| echo "matrix=$matrix" >> "$GITHUB_OUTPUT" | |
| echo "$matrix" | |
| build: | |
| needs: prepare | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install build dependencies (cached) | |
| uses: awalsh128/cache-apt-pkgs-action@681749ae568c81c2037cb9185e38b709b261bd2f # v1.6.1 | |
| with: | |
| packages: build-essential bc bison flex libssl-dev libelf-dev xz-utils curl | |
| version: 1 | |
| - uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0 | |
| with: | |
| babashka-version: 1.12.218 | |
| - name: Build kernel and stage artifact | |
| env: | |
| NAME: ${{ matrix.name }} | |
| run: bb build "$NAME" | |
| - name: Upload build outputs | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: out-${{ matrix.name }} | |
| path: out/ | |
| if-no-files-found: error | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: turtlequeue/setup-babashka@d78ec6570aea3b614bc695cafcceb82eb45c2af9 # v1.8.0 | |
| with: | |
| babashka-version: 1.12.218 | |
| - name: Download all build outputs | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| pattern: out-* | |
| path: dist | |
| - name: Publish release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GIT_SHA: ${{ github.sha }} | |
| run: bb release dist "$GIT_SHA" |