-
Notifications
You must be signed in to change notification settings - Fork 20
71 lines (71 loc) · 1.95 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: create release
run: gh release create "v${{ github.ref_name }}" -t "v${{ github.ref_name }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
linux:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- run: cargo build --release -j`nproc`
- run: |
mv target/release/nomino nomino-linux-64bit
gh release upload "v${{ github.ref_name }}" nomino-linux-64bit --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
macos:
runs-on: macos-latest
permissions:
contents: write
packages: write
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- run: cargo build --release -j`sysctl -n hw.physicalcpu`
- run: |
mv target/release/nomino nomino-macos-64bit
gh release upload "v${{ github.ref_name }}" nomino-macos-64bit --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
windows:
runs-on: windows-latest
permissions:
contents: write
packages: write
needs: [release]
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- run: cargo build --release
- run: |
mv target/release/nomino.exe nomino-windows-64bit.exe
gh release upload "v${{ github.ref_name }}" nomino-windows-64bit.exe --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}