From 92d975208e9c2eb5f24498df30a3e2ddaee19d35 Mon Sep 17 00:00:00 2001 From: "Ahmed K. A" Date: Wed, 2 Nov 2022 14:01:30 +0300 Subject: [PATCH] fix: add correct build steps --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2731e9a..64fbf68 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,31 +1,47 @@ -name: "test-on-pr" -on: [pull_request] +name: Release +on: + push: + tags: + - 'v*' + workflow_dispatch: jobs: - test-tauri: + release: strategy: fail-fast: false matrix: - platform: [macos-latest, ubuntu-20.04, windows-latest] - + platform: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v2 - - name: setup node - uses: actions/setup-node@v1 - with: - node-version: 16 - - name: install Rust stable - uses: actions-rs/toolchain@v1test - with: - toolchain: stable - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-20.04' - run: | - sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf - - name: install app dependencies and build it - run: yarn && yarn build - - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Node.js setup + uses: actions/setup-node@v1 + with: + node-version: 16 + + - name: Rust setup + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + - name: Install app dependencies and build web + run: yarn && yarn build + + - name: Build the app + uses: tauri-apps/tauri-action@v0 + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tagName: v__VERSION__ # tauri-action replaces \_\_VERSION\_\_ with the app version + releaseName: 'v__VERSION__' + releaseBody: 'See the assets to download this version and install.' + releaseDraft: true + prerelease: false