cargo: bump to v0.10.0 #1
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: | |
- "**" | |
jobs: | |
release: | |
name: Create release | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release create ${{ github.ref_name }} | |
assets: | |
name: Create artifact | |
needs: release | |
permissions: | |
id-token: write | |
attestations: write | |
contents: write | |
strategy: | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install toolchain | |
run: | | |
rustup toolchain install stable | |
rustup target install ${{ matrix.target }} | |
- name: Build executable | |
id: build | |
run: | | |
cargo build --release --target ${{ matrix.target }} --no-default-features | |
echo path=target/${{ matrix.target }}/release/marker >> $GITHUB_OUTPUT | |
- name: Package executable | |
id: package | |
env: | |
NAME: marker-${{ github.ref_name }}-${{ matrix.target }} | |
run: | | |
mkdir -p $NAME | |
cp ${{ steps.build.outputs.path }} $NAME/ | |
tar --create --gzip --file $NAME.tar.gz $NAME/ | |
echo name=$NAME >> $GITHUB_OUTPUT | |
echo path=$NAME.tar.gz >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release upload ${{ github.ref_name }} ${{ steps.package.outputs.path }} | |
- name: Generate attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: ${{ steps.build.outputs.path }} | |
subject-name: ${{ steps.package.outputs.name }} |