Skip to content

Commit 939d22f

Browse files
committed
chore: add github actions
1 parent ad1a449 commit 939d22f

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

.github/workflows/build.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
- name: Compile
14+
id: compile
15+
uses: rust-build/rust-build.action@v1.4.5
16+
with:
17+
RUSTTARGET: x86_64-unknown-linux-musl
18+
UPLOAD_MODE: none
19+
TOOLCHAIN_VERSION: 1.87.0
20+
- name: Upload artifact
21+
uses: actions/upload-artifact@v4
22+
with:
23+
name: Binary
24+
path: |
25+
${{ steps.compile.outputs.BUILT_ARCHIVE }}
26+
${{ steps.compile.outputs.BUILT_CHECKSUM }}

.github/workflows/release.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
jobs:
6+
release:
7+
name: release ${{ matrix.target }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- target: x86_64-pc-windows-gnu
14+
archive: zip
15+
- target: x86_64-unknown-linux-musl
16+
archive: tar.gz tar.xz tar.zst
17+
- target: x86_64-apple-darwin
18+
archive: zip
19+
steps:
20+
- uses: actions/checkout@master
21+
- name: Compile and release
22+
uses: rust-build/rust-build.action@v1.4.5
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
with:
26+
RUSTFLAGS: "-C link-arg=-mmacosx-version-min=10.10.0"
27+
RUSTTARGET: ${{ matrix.target }}
28+
ARCHIVE_TYPES: ${{ matrix.archive }}
29+
TOOLCHAIN_VERSION: 1.87.0

0 commit comments

Comments
 (0)