Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish released version binaries #32

Merged
merged 2 commits into from
Jul 13, 2024
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
67 changes: 67 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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 }}
Loading