-
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (60 loc) · 2.75 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
on:
release:
types: [ created ]
jobs:
release:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LASTFM_API_KEY: ${{ secrets.LASTFM_API_KEY }}
LASTFM_USERNAME: ${{ secrets.LASTFM_USERNAME }}
SPOTIFY_CALLBACK: ${{ secrets.SPOTIFY_CALLBACK }}
SPOTIFY_CLIENT: ${{ secrets.SPOTIFY_CLIENT }}
SPOTIFY_SECRET: ${{ secrets.SPOTIFY_SECRET }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux-x86_64
target: x86_64-unknown-linux-gnu
runner: ubuntu-latest
zip: vrc-osc,libchatbox.so,libclock.so,libcontrol.so,libdebug.so,liblastfm.so,libspotify.so,libsteamvr.so
- name: macOS-Apple
target: aarch64-apple-darwin
runner: macos-latest
zip: vrc-osc,libchatbox.dylib,libclock.dylib,libcontrol.dylib,libdebug.dylib,liblastfm.dylib,libspotify.dylib
- name: macOS-Intel
target: x86_64-apple-darwin
runner: macos-latest
zip: vrc-osc,libchatbox.dylib,libclock.dylib,libcontrol.dylib,libdebug.dylib,liblastfm.dylib,libspotify.dylib
- name: Windows
target: x86_64-pc-windows-msvc
runner: windows-latest
zip: vrc-osc.exe,chatbox.dll,clock.dll,control.dll,debug.dll,lastfm.dll,spotify.dll,steamvr.dll
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- name: Fetch Repository
uses: actions/checkout@v3
- name: Update and Install Dependencies (Linux)
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev libxdo-dev
- name: Update Rust Toolchain
run: rustup update stable
- name: Add Rust Target
run: rustup target add ${{ matrix.target }}
- name: Build Release Binary (macOS)
if: ${{ matrix.runner == 'macos-latest' }}
run: cargo build --release --target ${{ matrix.target }} --workspace --exclude plugin-control --exclude plugin-steamvr
- name: Build Release Binary (Other)
if: ${{ matrix.runner != 'macos-latest' }}
run: cargo build --release --target ${{ matrix.target }}
- name: Create Zip Archive (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: bash -c '7z a ${{ matrix.name }}.zip ./target/${{ matrix.target }}/release/{${{ matrix.zip }}}'
- name: Create Zip Archive (Other)
if: ${{ matrix.runner != 'windows-latest' }}
run: zip -j ${{ matrix.name }}.zip target/${{ matrix.target }}/release/{${{ matrix.zip }}}
- name: Upload Zip Archive
run: gh release upload ${{ github.ref_name }} ${{ matrix.name }}.zip --clobber