releng ci #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 | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.*' | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: '10.11' | ||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: extract version | ||
shell: bash | ||
run: | | ||
VERSION_TAG="${{ github.ref_name }}" | ||
VERSION="${VERSION_TAG#v}" | ||
echo "VERSION=${VERSION}" >> $GITHUB_ENV | ||
echo "Version: ${VERSION}" | ||
if ! grep -q "version = \"$VERSION\"" Cargo.toml; then | ||
exit 1 | ||
fi | ||
- run: 'gh release create "v${VERSION}" --draft --verify-tag --title "$VERSION"' | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
upload-binaries: | ||
needs: create-release | ||
strategy: | ||
matrix: | ||
include: | ||
- target: x86_64-unknown-linux-musl | ||
os: ubuntu-latest | ||
default-features: 'no-default-features' | ||
features: rustls | ||
- target: aarch64-unknown-linux-musl | ||
os: ubuntu-latest | ||
default-features: 'no-default-features' | ||
features: rustls | ||
- target: aarch64-apple-darwin | ||
os: macos-latest | ||
- target: universal-apple-darwin | ||
os: macos-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
bin: mairu | ||
target: '${{ matrix.target }}' | ||
tar: unix | ||
no-default-features: '${{ matrix.default-features == "no-default-features" }}' | ||
Check failure on line 58 in .github/workflows/release.yml
|
||
features: ${{ matrix.features || '' }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
upload-debs: | ||
needs: create-release | ||
strategy: | ||
matrix: | ||
include: | ||
- target: x86_64-unknown-linux-musl | ||
os: ubuntu-latest | ||
- target: aarch64-unknown-linux-musl | ||
os: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: "${{ matrix.target }}" | ||
- run: 'cargo install cargo-deb --locked' | ||
- run: 'cargo deb --target=${{ matrix.target }}' | ||
- run: 'gh release upload "${{ github.ref_name }}" target/debian/*.deb' | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' |