-
Notifications
You must be signed in to change notification settings - Fork 4
86 lines (77 loc) · 2.32 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: release binaries
on:
release:
types: [created]
permissions:
contents: write
jobs:
upload-bins:
name: "Upload release binaries"
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# Install dependencies per OS
# copy the dependencies step from the ci.yml file
- if: matrix.os == 'ubuntu-latest'
name: Install dependencies (ubuntu-latest)
run: |
sudo apt update
sudo apt-get install libasound2-dev
- if: matrix.os == 'macOS-latest'
name: Install dependencies (macOS-latest)
run: |
brew install llvm
- if: matrix.os == 'windows-latest'
name: Install ASIO SDK
env:
LINK: https://www.steinberg.net/asiosdk
run: |
curl -L -o asio.zip $env:LINK
7z x -oasio asio.zip
move asio\*\* asio\
choco install asio4all
choco install llvm
- if: matrix.os == 'windows-latest'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.75.0 # to support Windows 7
target: x86_64-pc-windows-msvc
- if: matrix.os != 'windows-latest'
uses: dtolnay/rust-toolchain@stable
# All
- uses: taiki-e/upload-rust-binary-action@v1
with:
target: ${{ matrix.target }}
bin: ruxguitar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-crate:
name: "Publish on crates.io"
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
# Install dependencies per OS
# copy the dependencies step from the ci.yml file
- name: Install dependencies (ubuntu-latest)
run: |
sudo apt update
sudo apt-get install libasound2-dev
- name: Publish
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_TOKEN }}