Skip to content

Commit db42ce9

Browse files
fix(.github): release workflow (#276)
Signed-off-by: KeisukeYamashita <[email protected]>
1 parent 6bef9b3 commit db42ce9

File tree

4 files changed

+54
-61
lines changed

4 files changed

+54
-61
lines changed

.github/workflows/build_release.yaml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,51 @@ permissions:
1414
pages: write # To deploy to GitHub Pages
1515

1616
jobs:
17+
build:
18+
runs-on: ${{ matrix.config.os }}
19+
strategy:
20+
fail-fast: true
21+
matrix:
22+
config:
23+
- os: ubuntu-20.04
24+
rust_target: x86_64-unknown-linux-gnu
25+
ext: ""
26+
args: ""
27+
- os: macos-latest
28+
rust_target: x86_64-apple-darwin
29+
ext: ""
30+
args: ""
31+
- os: macos-latest
32+
rust_target: aarch64-apple-darwin
33+
ext: ""
34+
args: ""
35+
- os: windows-latest
36+
rust_target: x86_64-pc-windows-msvc
37+
ext: ".exe"
38+
args: ""
39+
- os: windows-latest
40+
rust_target: aarch64-pc-windows-msvc
41+
ext: ".exe"
42+
args: "--no-default-features --features native-tls-vendored"
43+
steps:
44+
- uses: actions/checkout@v4
45+
46+
- uses: actions-rs/toolchain@v1
47+
with:
48+
profile: minimal
49+
toolchain: stable
50+
override: true
51+
52+
- run: cargo build --release
53+
54+
- run: tar czvf commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz -C target/release commitlint${{ matrix.config.ext }}
55+
56+
- uses: actions/upload-artifact@v4
57+
with:
58+
name: commitlint-${{ matrix.config.os }}
59+
path: commitlint-${{ github.ref_name }}-${{ matrix.config.rust_target }}.tar.gz
60+
if-no-files-found: error
61+
1762
crate:
1863
runs-on: ubuntu-latest
1964
environment: crate
@@ -68,12 +113,19 @@ jobs:
68113
publish:
69114
runs-on: ubuntu-latest
70115
needs:
116+
- build
71117
- crate
72118
- docker
73119
- web
74120
steps:
121+
- uses: actions/download-artifact@v4
122+
with:
123+
path: commitlint
124+
pattern: commitlint-*
125+
merge-multiple: true
75126
- uses: ncipollo/release-action@v1
76127
with:
128+
artifacts: commitlint/commitlint-*.tar.gz
77129
generateReleaseNotes: true
78130

79131
web:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ documentation = "https://keisukeyamashita.github.io/commitlint-rs"
55
authors = ["KeisukeYamashita <[email protected]>"]
66
keywords = ["conventional-commits", "lint"]
77
categories = ["command-line-utilities"]
8-
version = "0.1.7"
8+
version = "0.1.8"
99
readme = "README.md"
1010
repository = "https://github.com/KeisukeYamashita/commitlint-rs"
1111
license = "MIT OR Apache-2.0"

0 commit comments

Comments
 (0)