Release r3 #3
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 | |
| run-name: Release ${{ github.ref_name }} | |
| # Build + test + publish on push of a revision tag (r1, r2, ...). | |
| # Rolling: every rev tag triggers a new release. Only the latest GitHub | |
| # release survives -- it is always named "yamls" and carries the | |
| # inlined/*.yaml distribution artefacts. ghcr image tags are versioned | |
| # per-flavour (ghcr.io/<repo>/{bread,bread-chisel-releases}:<ver>) and | |
| # stay around as overwrite-on-push tags. | |
| on: | |
| push: | |
| tags: | |
| - 'r[0-9]*' | |
| workflow_dispatch: | |
| jobs: | |
| binaries: | |
| uses: ./.github/workflows/binaries.yaml | |
| build-and-test: | |
| needs: binaries | |
| uses: ./.github/workflows/build-and-test.yaml | |
| build-oci: | |
| needs: [binaries, build-and-test] | |
| uses: ./.github/workflows/build-oci.yaml | |
| push-ghcr: | |
| needs: build-oci | |
| uses: ./.github/workflows/push-ghcr.yaml | |
| permissions: | |
| contents: read | |
| packages: write | |
| publish-release: | |
| needs: build-oci | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Regenerate inlined yamls | |
| run: make inlined-yaml-files | |
| - name: Delete prior r* release objects (keep their git tags) | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| KEEP: ${{ github.ref_name }} | |
| run: | | |
| set -e | |
| gh release list --json tagName --jq '.[].tagName' | \ | |
| grep -E '^r[0-9]+$' | \ | |
| while read -r t; do | |
| if [ "$t" != "$KEEP" ]; then | |
| echo "Deleting prior release object: $t (tag preserved)" | |
| gh release delete "$t" --yes || true | |
| fi | |
| done | |
| - name: Create release "yamls" w/ inlined yamls attached | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: yamls | |
| files: inlined/*.yaml | |
| make_latest: true | |
| fail_on_unmatched_files: true | |
| body: | | |
| self-contained spread yamls for the bread + bread-chisel-releases | |
| ghcr images. each yaml inlines the allocate / discard glue and | |
| points at the matching ghcr multiarch image | |
| (ghcr.io/lczyk/spread-bread/<flavour>:<ver>). | |
| drop one into your project as `spread.yaml`: | |
| ``` | |
| curl -fsSL https://github.com/lczyk/spread-bread/releases/latest/download/bread-chisel-releases-26.04.yaml -o spread.yaml | |
| spread | |
| ``` |