Skip to content

Commit

Permalink
ci: add zip
Browse files Browse the repository at this point in the history
  • Loading branch information
progre committed Aug 1, 2024
1 parent 254a20d commit 7a368b2
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: Build

on:
push:
tags: ["v*.*.*"]
branches: [main]
tags: ['v*.*.*']

jobs:
publish-tauri:
Expand All @@ -12,14 +13,14 @@ jobs:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-22.04"
args: ""
- platform: "windows-latest"
args: ""
- platform: 'macos-latest'
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest'
args: '--target x86_64-apple-darwin'
- platform: 'ubuntu-22.04'
args: ''
- platform: 'windows-latest'
args: ''

runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -44,6 +45,12 @@ jobs:
- name: install frontend dependencies
run: npm install

- name: test
shell: bash
run: |
cd src-tauri/
cargo test
- if: startsWith(github.ref, 'refs/tags/')
uses: tauri-apps/tauri-action@v0
env:
Expand All @@ -55,3 +62,16 @@ jobs:
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}

- name: zip
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'windows-latest'
shell: bash
run: |
cd src-tauri/target/release/
zip ${{ github.ref_name }}_x64-windows.zip lmocodec.exe lmorandomizer.exe res/
- name: release zip
if: startsWith(github.ref, 'refs/tags/') && matrix.platform == 'windows-latest'
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ github.ref_name }}_x64-windows.zip

0 comments on commit 7a368b2

Please sign in to comment.