-
-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (50 loc) · 1.28 KB
/
main.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
on:
push:
branches:
- 'main'
name: Stable
jobs:
test:
name: Test project
runs-on: macos-11 # add other OS later
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: cargo-bundle
build:
name: Build project
permissions: write-all
runs-on: macos-latest # add other OS later
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
- uses: actions-rs/cargo@v1
with:
command: install
args: cargo-bundle
- uses: actions-rs/cargo@v1
with:
command: bundle
args: --release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: GoKey.app
path: target/release/bundle/osx/GoKey.app
retention-days: 2
- name: Release nightly
env:
GH_TOKEN: ${{ github.token }}
run: |
cd target/release/bundle/osx
zip -r GoKey.zip GoKey.app
gh release delete-asset nightly-build GoKey.zip
gh release upload nightly-build GoKey.zip