-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (33 loc) · 1023 Bytes
/
release.yaml
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
name: Release
on:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
name: Build binary
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo pacman -Syyuu --noconfirm --needed clang cmake rust avahi cuda ffmpeg gcc-libs glibc libpulse nvidia-utils openssl opus
- name: Build
run: cargo build --release
- name: Compress
run: |
mkdir "$RUNNER_TEMP/$GITHUB_REF_NAME"
cp -r ./target/release/moonshine README.md "$RUNNER_TEMP/$GITHUB_REF_NAME"
cp LICENSE "$RUNNER_TEMP/$GITHUB_REF_NAME/LICENSE"
tar caf "./moonshine-$GITHUB_REF_NAME-linux-amd64.tar.xz" -C "$RUNNER_TEMP" "$GITHUB_REF_NAME"
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: "./moonshine-*.tar.xz"