Skip to content

Commit 8a74a00

Browse files
committed
fix: build
1 parent cba3153 commit 8a74a00

File tree

1 file changed

+17
-41
lines changed

1 file changed

+17
-41
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,25 @@ permissions:
1313
contents: write
1414

1515
jobs:
16-
goreleaser:
16+
release:
17+
name: release ${{ matrix.target }}
1718
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- target: x86_64-pc-windows-gnu
24+
archive: zip
25+
- target: x86_64-unknown-linux-musl
26+
archive: tar.gz tar.xz tar.zst
27+
- target: x86_64-apple-darwin
28+
archive: zip
1829
steps:
19-
-
20-
name: Checkout
21-
uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
24-
-
25-
name: Set up Zig
26-
uses: mlugg/setup-zig@v1
27-
-
28-
name: Set up Rust
29-
uses: actions-rs/toolchain@v1
30-
with:
31-
toolchain: stable
32-
profile: minimal
33-
override: true
34-
-
35-
name: Install zigbuild
36-
run: cargo install cargo-zigbuild
37-
-
38-
name: Install openssl
39-
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
40-
41-
-
42-
name: Run GoReleaser
43-
uses: goreleaser/goreleaser-action@v6
44-
if: startsWith(github.ref, 'refs/tags/')
45-
with:
46-
distribution: goreleaser
47-
version: '~> v2'
48-
args: release --clean
30+
- uses: actions/checkout@master
31+
- name: Compile and release
32+
uses: rust-build/[email protected]
4933
env:
5034
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
52-
-
53-
name: Run GoReleaser Snapshot
54-
uses: goreleaser/goreleaser-action@v6
55-
if: "!startsWith(github.ref, 'refs/tags/')"
5635
with:
57-
distribution: goreleaser
58-
version: '~> v2'
59-
args: release --clean --snapshot
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
RUSTTARGET: ${{ matrix.target }}
37+
ARCHIVE_TYPES: ${{ matrix.archive }}

0 commit comments

Comments
 (0)