-
Notifications
You must be signed in to change notification settings - Fork 23
52 lines (42 loc) · 1.08 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build and Release Rust Project
on:
release:
types: [created]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust for Windows
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-msvc
- name: Install dependencies
run: cargo fetch
- name: Build
run: cargo build --release
- name: Upload artifact (Windows)
uses: actions/upload-artifact@v3
with:
name: windows-latest-build
path: target/release/arnis.exe
release:
runs-on: windows-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Windows build artifact
uses: actions/download-artifact@v3
with:
name: windows-latest-build
path: ./builds/windows
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
builds/windows/arnis.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}