Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: Existing release tag to build and publish
required: true
type: string

permissions:
contents: read
Expand All @@ -14,12 +20,14 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Validate release tag and package versions
env:
RELEASE_TAG: ${{ github.ref_name }}
RELEASE_TAG: ${{ inputs.tag || github.ref_name }}
run: python3 scripts/check-release-version.py --tag "$RELEASE_TAG"
- name: Check Rust workspace
run: |
Expand Down Expand Up @@ -47,14 +55,16 @@ jobs:
- aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: taiki-e/install-action@cross
- uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
- name: Build sc
run: cross build --locked --release --target "${{ matrix.target }}" --bin sc
- name: Package binary
- name: Package and validate binary
env:
TARGET: ${{ matrix.target }}
run: |
Expand All @@ -68,7 +78,11 @@ jobs:
cosign sign-blob --yes \
--bundle "dist/sc-$TARGET.tar.gz.sha256.sigstore.json" \
"dist/sc-$TARGET.tar.gz.sha256"
"target/$TARGET/release/sc" --version
if [[ "$TARGET" == "x86_64-unknown-linux-musl" ]]; then
"target/$TARGET/release/sc" --version
else
file "target/$TARGET/release/sc" | grep -F "ARM aarch64"
fi
- uses: actions/upload-artifact@v4
with:
name: sc-${{ matrix.target }}
Expand All @@ -92,6 +106,7 @@ jobs:
merge-multiple: true
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.tag || github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: dist/*
Loading