File tree Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Rust Project
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*"
7
+
8
+ jobs :
9
+ build :
10
+ name : Build for ${{ matrix.target }}
11
+ runs-on : ${{ matrix.os }}
12
+ strategy :
13
+ matrix :
14
+ include :
15
+ - os : ubuntu-latest
16
+ target : x86_64-unknown-linux-gnu
17
+ short : linux
18
+ bin_suffix : " "
19
+ - os : macos-latest
20
+ target : x86_64-apple-darwin
21
+ short : macos
22
+ bin_suffix : " "
23
+ - os : windows-latest
24
+ target : x86_64-pc-windows-msvc
25
+ short : windows
26
+ bin_suffix : " .exe"
27
+ steps :
28
+ - name : Checkout repository
29
+ uses : actions/checkout@v4
30
+
31
+ - name : Install Rust
32
+ uses : dtolnay/rust-toolchain@stable
33
+ with :
34
+ targets : ${{ matrix.target }}
35
+
36
+ - name : Build binary
37
+ run : cargo build --release --target ${{ matrix.target }}
38
+
39
+ - name : Rename binary
40
+ run : |
41
+ mkdir -p artifacts
42
+ cp target/${{ matrix.target }}/release/css-linter${{ matrix.bin_suffix }} artifacts/
43
+ shell : bash
44
+
45
+ - name : Upload artifact
46
+ uses : actions/upload-artifact@v4
47
+ with :
48
+ name : css-linter-${{ matrix.short }}${{ matrix.bin_suffix }}
49
+ path : artifacts/
50
+
51
+ release :
52
+ name : Create Release
53
+ needs : build
54
+ runs-on : ubuntu-latest
55
+ steps :
56
+ - name : Download all artifacts
57
+ uses : actions/download-artifact@v4
58
+ with :
59
+ path : artifacts
60
+
61
+ - name : Create GitHub Release
62
+ uses : softprops/action-gh-release@v2
63
+ with :
64
+ files : artifacts/**/*
65
+ env :
66
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
.vscode
2
2
target
3
- Cargo.lock
3
+ Cargo.lock
4
+ npm-package
You can’t perform that action at this time.
0 commit comments