Skip to content

Commit

Permalink
update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
guyutongxue committed May 7, 2022
1 parent 2aa6f71 commit 6a86542
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/tauri.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: "Tauri"
on:
push:
branches: [ main ]
tags: [ "*" ]
branches: [main]
tags: ["*"]
pull_request:
branches: [ main ]
branches: [main]

env:
TAURI_SCRIPT: pnpm tauri
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
Expand All @@ -18,20 +17,23 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
bundle: "vscch.exe"
bundle: "msi/vscch*.msi"
exe: "vscch.exe"
- os: ubuntu-latest
bundle: "bundle/appimage/vscch*.AppImage"
bundle: "appimage/vscch*.AppImage"
exe: "vscch"
- os: macos-latest
bundle: "bundle/dmg/vscch*.dmg"
bundle: "dmg/vscch*.dmg"
exe: "vscch"

runs-on: ${{ matrix.os }}
# https://github.com/tauri-apps/tauri-action#testing-the-build

steps:
- uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: "16"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
Expand All @@ -47,9 +49,16 @@ jobs:
pnpm install
- name: Tauri build
run: pnpm tauri build
- name: Pack executable
if: ${{ github.ref_type == 'tag' }}
run: |
cd ${{ github.workspace }}
7z a src-tauri/target/vscch_${{ github.ref_name }}_${{ runner.os }}.7z src-tauri/target/release/${{ matrix.exe }} ${{ github.workspace }}/LICENSE
- name: Release
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ github.ref_type == 'tag' }}
uses: softprops/action-gh-release@v1
with:
files: ${{ github.workspace }}/src-tauri/target/release/${{ matrix.bundle }}
files: |
${{ github.workspace }}/src-tauri/target/release/bundle/${{ matrix.bundle }}
${{ github.workspace }}/src-tauri/target/vscch*.7z
draft: true

0 comments on commit 6a86542

Please sign in to comment.