-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from patrickdronk/master
Add windows support
- Loading branch information
Showing
10 changed files
with
276 additions
and
4,414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,122 +6,39 @@ on: | |
tags: | ||
- v** | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
RUST_BACKTRACE: short | ||
|
||
jobs: | ||
release: | ||
publish-tauri: | ||
permissions: | ||
contents: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# os: [windows-latest, ubuntu-latest, macos-latest] | ||
os: [macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
platform: [macos-latest, windows-latest] | ||
|
||
- name: Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: src-tauri | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v1 | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install Dependencies (ubuntu only) | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
node-version: 20 | ||
- name: install Rust stable | ||
uses: dtolnay/rust-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: Reconfigure git to use HTTP authentication | ||
run: > | ||
git config --global url."https://github.com/".insteadOf | ||
ssh://[email protected]/ | ||
- name: Get yarn cache dir path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Yarn Cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Yarn install | ||
run: | | ||
yarn install --network-timeout 1000000 | ||
- name: Tauri build | ||
uses: tauri-apps/tauri-action@v0 | ||
# enable cache even though failed | ||
# continue-on-error: true | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | ||
- name: install frontend dependencies | ||
run: yarn install # change this to npm or pnpm depending on which one you use | ||
- uses: tauri-apps/tauri-action@v0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
with: | ||
tagName: v__VERSION__ | ||
releaseName: "Lanaya v__VERSION__" | ||
releaseBody: "More new features are now supported." | ||
releaseDraft: false | ||
prerelease: true | ||
|
||
# - name: Portable Bundle | ||
# if: matrix.os == 'windows-latest' | ||
# # rebuild with env settings | ||
# run: | | ||
# yarn build | ||
# yarn run portable | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
# VITE_WIN_PORTABLE: 1 | ||
|
||
release-update: | ||
needs: release | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Reconfigure git to use HTTP authentication | ||
run: > | ||
git config --global url."https://github.com/".insteadOf | ||
ssh://[email protected]/ | ||
- name: Get yarn cache dir path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Yarn Cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Yarn install | ||
run: yarn install | ||
|
||
- name: Release updater file | ||
run: yarn run updater | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version | ||
releaseName: 'App v__VERSION__' | ||
releaseBody: 'See the assets to download this version and install.' | ||
releaseDraft: true | ||
prerelease: false |
Oops, something went wrong.