Skip to content

releng ci

releng ci #1

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 58, Col: 32): Unexpected symbol: '"no-default-features"'. Located at position 28 within expression: matrix.default-features == "no-default-features"
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 }}'