Skip to content

Commit

Permalink
Update release.yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgaiser authored Sep 6, 2024
1 parent 4b5a2fe commit b985aa2
Showing 1 changed file with 43 additions and 44 deletions.
87 changes: 43 additions & 44 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
# Disabled for now, until the dependency on ffmpeg is removed this isn't that useful.
# 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"
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"

0 comments on commit b985aa2

Please sign in to comment.