Skip to content
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
59 changes: 59 additions & 0 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
rust_target: x86_64-unknown-linux-gnu
ext: ''
args: ''
- os: macos-latest
rust_target: x86_64-apple-darwin
ext: ''
args: ''
- os: macos-latest
rust_target: aarch64-apple-darwin
ext: ''
args: ''
- os: windows-latest
rust_target: x86_64-pc-windows-msvc
ext: '.exe'
args: ''
- os: windows-latest
rust_target: aarch64-pc-windows-msvc
ext: '.exe'
args: '--no-default-features --features native-tls-vendored'

steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- run: cargo build --verbose

- run: cargo test --verbose

- run: cargo build --release

- run: tar czvf commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz -C target/release commitlint${{ matrix.config.ext }}

- uses: softprops/action-gh-release@v1
with:
files: |
commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}