fix: release workflow removing SBOM generation #32
Workflow file for this run
This file contains 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: | |
- '*' | |
defaults: | |
run: | |
shell: bash | |
env: | |
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
jobs: | |
native: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: stable | |
target: x86_64-unknown-linux-gnu | |
artifact_name: jira_cli | |
asset_name: jira_cli-linux_amd64 | |
- os: macos-latest | |
rust: stable | |
target: x86_64-apple-darwin | |
artifact_name: jira_cli | |
asset_name: jira_cli-darwin_amd64 | |
steps: | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: jira_cli-${{ matrix.target }} | |
cache-on-failure: true | |
- uses: actions/checkout@v4 | |
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
name: Update Rustup and define default toolchain | |
- run: rustup target add ${{ matrix.target }} | |
name: Add target | |
- run: sudo apt update -y && sudo apt install expect gcc-multilib libjemalloc-dev libsecret-1-0 libsecret-1-dev -y | |
name: Install dependencies for Linux | |
if: matrix.os == 'ubuntu-latest' | |
- run: rustup component add rustfmt || echo "rustfmt not available" | |
name: Install rustfmt | |
- run: cargo build --release --target ${{ matrix.target }} | |
name: Build | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref_name }} | |
cross: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
rust: stable | |
target: aarch64-unknown-linux-gnu | |
artifact_name: jira_cli | |
asset_name: jira_cli-linux_aarch64 | |
- os: macos-latest | |
rust: stable | |
target: aarch64-apple-darwin | |
artifact_name: jira_cli | |
asset_name: jira_cli-darwin_arm | |
steps: | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: jira_cli-${{ matrix.target }} | |
cache-on-failure: true | |
- uses: actions/checkout@v4 | |
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} | |
name: Update Rustup and define default toolchain | |
- run: rustup target add ${{ matrix.target }} | |
name: Add target | |
- run: sudo apt update -y && sudo apt install expect g++-aarch64-linux-gnu gcc-aarch64-linux-gnu libjemalloc-dev libsecret-1-0 libsecret-1-dev -y | |
name: Install dependencies for Linux | |
if: matrix.os == 'ubuntu-latest' | |
- run: rustup component add rustfmt || echo "rustfmt not available" | |
name: Install rustfmt | |
- run: cargo build --release --target ${{ matrix.target }} | |
name: Build for all architecture except Mac ARM | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
if: matrix.target != 'aarch64-apple-darwin' | |
- run: | | |
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) | |
MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version) | |
cargo build --release --target ${{ matrix.target }} | |
name: Build for Mac ARM | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
if: matrix.target == 'aarch64-apple-darwin' | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v1-release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref_name }} |