Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically release Tauri binaries #951

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build_zip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set -ex

main() {
local src=$(pwd) \
stage=

if [[ $OS_NAME =~ ^macos\-.*$ ]]; then
stage=$(mktemp -d -t tmp)
else
stage=$(mktemp -d)
fi

cp "src-tauri/target/release/LiveSplit One.exe" "$stage/LiveSplit One.exe" 2>/dev/null || :
cp "src-tauri/target/release/LiveSplit One" "$stage/LiveSplit One" 2>/dev/null || :
cp "src-tauri/target/release/live-split-one" "$stage/livesplit-one" 2>/dev/null || :

cd $stage
if [ "$OS_NAME" = "windows-latest" ]; then
7z a $src/LiveSplitOne-$TARGET.zip *
else
tar czf $src/LiveSplitOne-$TARGET.tar.gz *
fi
cd $src

rm -rf $stage
}

main
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -195,3 +197,20 @@ jobs:
publish_branch: gh-pages
publish_dir: ./${{ matrix.dist_path }}
force_orphan: true

- name: Prepare Release (Tauri)
if: matrix.platform == 'tauri' && github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
shell: bash
run: .github/workflows/build_zip.sh
env:
OS_NAME: ${{ matrix.os }}
TARGET: ${{ matrix.binaryen }}

- name: Release (Tauri)
if: matrix.platform == 'tauri' && github.repository == 'LiveSplit/LiveSplitOne' && github.ref == 'refs/heads/master'
uses: softprops/action-gh-release@v2
with:
files: LiveSplitOne-*.*
name: Latest
tag_name: latest
body: The latest desktop version of LiveSplit One, which has support for global hotkeys.
Loading