chore(stackablectl): Release 1.5.1 (#454) #37
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: Stackablectl Release Pipeline | |
| permissions: {} | |
| on: | |
| push: | |
| tags: | |
| - "stackablectl-[0-9]+.[0-9]+.[0-9]+**" | |
| env: | |
| CARGO_CYCLONEDX_VERSION: 0.5.7 | |
| RUST_VERSION: 1.97.1 | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: "0" | |
| CARGO_PROFILE_DEV_DEBUG: "0" | |
| RUSTFLAGS: "-D warnings" | |
| RUSTDOCFLAGS: "-D warnings" | |
| RUST_LOG: "info" | |
| RELEASE_TAG: ${{ github.ref_name }} | |
| jobs: | |
| create-release: | |
| name: Create Draft Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # required to draft the release | |
| steps: | |
| # This checkout is only here so that a .git directory is present because the gh CLI needs it. | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Create Draft Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release create --draft --verify-tag "$RELEASE_TAG" | |
| release: | |
| name: Release for ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - create-release | |
| permissions: | |
| contents: write # required to upload release binaries and SBOM assets to the GitHub Release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-24.04 | |
| file-suffix: "" | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-24.04-arm | |
| file-suffix: "" | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| file-suffix: "" | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| file-suffix: "" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| submodules: recursive | |
| - uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # v1 | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| targets: ${{ matrix.target }} | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: '^1.26.0' | |
| - name: Install cargo-cyclonedx | |
| run: cargo install --locked cargo-cyclonedx@"$CARGO_CYCLONEDX_VERSION" | |
| - name: Build Binary | |
| if: matrix.os != 'windows-latest' | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| run: cargo build --target "$TARGET" --release --package stackablectl | |
| - name: Generate SBOM | |
| run: cargo cyclonedx --all --spec-version 1.5 --describe binaries | |
| - name: Rename Binary | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| FILE_SUFFIX: ${{ matrix.file-suffix }} | |
| run: mv "target/$TARGET/release/stackablectl$FILE_SUFFIX" "stackablectl-$TARGET$FILE_SUFFIX" | |
| - name: Rename SBOM | |
| env: | |
| TARGET: ${{ matrix.target }} | |
| run: mv rust/stackablectl/stackablectl_bin.cdx.xml "stackablectl-$TARGET.cdx.xml" | |
| - name: Upload Release Binary and SBOM | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| TARGET: ${{ matrix.target }} | |
| FILE_SUFFIX: ${{ matrix.file-suffix }} | |
| run: gh release upload "$RELEASE_TAG" "stackablectl-$TARGET$FILE_SUFFIX" "stackablectl-$TARGET.cdx.xml" | |
| finish-release: | |
| name: Finish Release | |
| needs: | |
| - release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # required to finalize the release | |
| steps: | |
| # This checkout is only here so that a .git directory is present because the gh CLI needs it. | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Finish Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit --draft=false --latest "$RELEASE_TAG" |