Skip to content

release

release #40

Workflow file for this run

name: release
on:
push:
tags:
- 'v*.*.*'
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
FETCH_DEPTH: 0 # pull in the tags for the version string
jobs:
dist-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- run: cargo xtask changelog
- uses: actions/upload-artifact@v4
with:
name: dist-changelog
path: dist
dist-gnu:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
runs-on: ubuntu-latest
env:
GURK_TARGET: ${{ matrix.target }}
steps:
- name: system dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler gcc-aarch64-linux-gnu
- uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: dist
run: cargo xtask dist
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}
path: dist
dist-musl:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
runs-on: ubuntu-20.04
container:
image: rust:alpine
volumes:
- /usr/local/cargo/registry
env:
GURK_TARGET: ${{ matrix.target }}
steps:
- name: system dependencies
run: apk add --no-cache musl-dev lld protoc bash clang llvm
- uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: dist
# FIXME: building xtask without explicit target segfaults rustc
run: cargo run -p xtask --target x86_64-unknown-linux-musl -- dist
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}
path: dist
dist-apple:
strategy:
fail-fast: false
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
runs-on: macos-latest
env:
GURK_TARGET: ${{ matrix.target }}
SELECT_XCODE: /Applications/Xcode_13.2.app
steps:
- name: xcode
run: sudo xcode-select -s "${SELECT_XCODE}"
- name: protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
fetch-depth: ${{ env.FETCH_DEPTH }}
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: dist
run: cargo xtask dist
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.target }}
path: dist
publish:
name: publish
runs-on: ubuntu-latest
needs:
- dist-changelog
- dist-gnu
- dist-musl
- dist-apple
steps:
- uses: actions/download-artifact@v4
with:
name: dist-changelog
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-aarch64-apple-darwin
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-apple-darwin
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-unknown-linux-gnu
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-x86_64-unknown-linux-musl
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-aarch64-unknown-linux-gnu
path: dist
- uses: actions/download-artifact@v4
with:
name: dist-aarch64-unknown-linux-musl
path: dist
- run: ls -al
working-directory: dist
- name: release
uses: softprops/action-gh-release@v2
with:
body_path: dist/CHANGELOG.md
files: dist/*.tar.gz
draft: true