Skip to content

Commit a6b2c01

Browse files
committed
Add workflows for build and release
1 parent 48e47c8 commit a6b2c01

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
paths:
7+
- 'src/**'
8+
- 'Cargo.toml'
9+
- '.github/workflows/build.yml'
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Rust
20+
uses: actions-rs/toolchain@v1
21+
with:
22+
toolchain: nightly
23+
24+
- name: Enable nightly
25+
run: rustup override set nightly
26+
27+
- name: Rust cache
28+
uses: Swatinem/[email protected]
29+
30+
- name: Build library
31+
run: cargo build --release

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Rust
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: nightly
19+
20+
- name: Enable nightly
21+
run: rustup override set nightly
22+
23+
- name: Rust cache
24+
uses: Swatinem/[email protected]
25+
26+
- name: Build library
27+
run: cargo build --release
28+
29+
- name: Upload asset
30+
uses: xresloader/upload-to-github-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
file: "target/release/*.dll"
35+
update_latest_release: true

0 commit comments

Comments
 (0)