99 lines
2.6 KiB
YAML
Raw Normal View History

2022-02-22 01:56:06 +08:00
name: Release CI
2022-01-16 14:27:41 +08:00
2022-11-03 01:15:50 +08:00
on:
2022-11-24 10:35:22 +08:00
workflow_dispatch:
2022-11-03 01:15:50 +08:00
push:
tags:
- v**
2022-01-16 14:27:41 +08:00
env:
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
release:
2022-01-16 14:30:49 +08:00
strategy:
matrix:
2023-08-12 15:41:26 +08:00
os: [windows-latest, ubuntu-20.04, macos-latest]
2022-01-16 14:30:49 +08:00
runs-on: ${{ matrix.os }}
2022-11-24 10:41:03 +08:00
if: startsWith(github.repository, 'zzzgydi')
2022-01-16 14:27:41 +08:00
steps:
- name: Checkout repository
2023-08-12 15:41:26 +08:00
uses: actions/checkout@v3
2022-01-16 14:27:41 +08:00
2023-08-12 15:41:26 +08:00
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
2022-01-16 14:27:41 +08:00
- name: Rust Cache
2022-11-20 23:17:05 +08:00
uses: Swatinem/rust-cache@v2
2022-06-01 00:47:04 +08:00
with:
2022-11-20 23:17:05 +08:00
workspaces: src-tauri
2022-01-16 14:27:41 +08:00
- name: Install Node
2023-08-12 15:41:26 +08:00
uses: actions/setup-node@v3
2022-01-16 14:27:41 +08:00
with:
2023-08-12 15:41:26 +08:00
node-version: "16"
cache: "yarn"
2022-01-16 14:27:41 +08:00
2022-03-19 10:50:44 +08:00
- name: Install Dependencies (ubuntu only)
2022-09-02 01:27:06 +08:00
if: startsWith(matrix.os, 'ubuntu-')
2022-03-19 10:50:44 +08:00
run: |
2023-01-22 13:31:34 +08:00
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
2022-03-19 10:50:44 +08:00
2022-01-16 14:27:41 +08:00
- name: Yarn install and check
2022-01-21 03:08:40 +08:00
run: |
2023-08-12 15:41:26 +08:00
yarn install --network-timeout 1000000 --frozen-lockfile
2022-01-21 03:08:40 +08:00
yarn run check
2022-01-16 14:27:41 +08:00
- name: Tauri build
2022-11-20 23:17:05 +08:00
uses: tauri-apps/tauri-action@v0
2022-01-16 16:03:53 +08:00
# enable cache even though failed
2022-05-11 12:39:41 +08:00
# continue-on-error: true
2022-01-16 14:27:41 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-02-16 11:02:00 +08:00
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
2022-01-16 14:27:41 +08:00
with:
tagName: v__VERSION__
releaseName: "Clash Verge v__VERSION__"
2022-03-06 18:34:38 +08:00
releaseBody: "More new features are now supported."
2022-01-16 14:27:41 +08:00
releaseDraft: false
prerelease: true
2022-01-19 00:37:59 +08:00
2022-06-01 00:43:57 +08:00
- name: Portable Bundle
2023-08-12 15:41:26 +08:00
if: startsWith(matrix.os, 'windows-')
# rebuild with env settings
2022-03-13 00:59:42 +08:00
run: |
yarn build
2022-04-13 01:17:40 +08:00
yarn run portable
2022-03-15 00:00:20 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
VITE_WIN_PORTABLE: 1
2022-03-13 00:52:31 +08:00
2022-01-19 23:55:05 +08:00
release-update:
needs: release
2023-01-14 12:20:17 +08:00
runs-on: ubuntu-latest
2022-01-19 23:55:05 +08:00
if: |
startsWith(github.repository, 'zzzgydi') &&
startsWith(github.ref, 'refs/tags/v')
2022-01-19 00:37:59 +08:00
steps:
- name: Checkout repository
2023-08-12 15:41:26 +08:00
uses: actions/checkout@v3
2022-01-19 00:37:59 +08:00
2023-08-12 15:41:26 +08:00
- name: Install Node
uses: actions/setup-node@v3
2022-01-19 00:37:59 +08:00
with:
2023-08-12 15:41:26 +08:00
node-version: "16"
cache: "yarn"
2022-01-19 00:37:59 +08:00
- name: Yarn install
2023-08-12 15:41:26 +08:00
run: yarn install --network-timeout 1000000 --frozen-lockfile
2022-01-19 00:37:59 +08:00
- name: Release updater file
run: yarn run updater
2022-01-19 00:37:59 +08:00
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}