Skip to content

Commit 1455f14

Browse files
feat(config): add github releases flow (#221)
* feat(config): add github releases flow * Delete .idea directory * Update .github/workflows/build_release.yaml Co-authored-by: KeisukeYamashita <[email protected]> * Update .github/workflows/build_release.yaml Co-authored-by: KeisukeYamashita <[email protected]> * Update .github/workflows/build_release.yaml Co-authored-by: KeisukeYamashita <[email protected]> * Update .github/workflows/build_release.yaml Co-authored-by: KeisukeYamashita <[email protected]> --------- Co-authored-by: KeisukeYamashita <[email protected]>
1 parent 928fe0d commit 1455f14

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.config.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- os: ubuntu-20.04
16+
rust_target: x86_64-unknown-linux-gnu
17+
ext: ''
18+
args: ''
19+
- os: macos-latest
20+
rust_target: x86_64-apple-darwin
21+
ext: ''
22+
args: ''
23+
- os: macos-latest
24+
rust_target: aarch64-apple-darwin
25+
ext: ''
26+
args: ''
27+
- os: windows-latest
28+
rust_target: x86_64-pc-windows-msvc
29+
ext: '.exe'
30+
args: ''
31+
- os: windows-latest
32+
rust_target: aarch64-pc-windows-msvc
33+
ext: '.exe'
34+
args: '--no-default-features --features native-tls-vendored'
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: actions-rs/toolchain@v1
40+
with:
41+
profile: minimal
42+
toolchain: stable
43+
override: true
44+
45+
- run: cargo build --verbose
46+
47+
- run: cargo test --verbose
48+
49+
- run: cargo build --release
50+
51+
- run: tar czvf commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz -C target/release commitlint${{ matrix.config.ext }}
52+
53+
- uses: softprops/action-gh-release@v1
54+
with:
55+
files: |
56+
commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
59+

0 commit comments

Comments
 (0)