Skip to content

Commit

Permalink
chore: update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzgydi committed Aug 12, 2023
1 parent 741abc0 commit 241b22a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 51 deletions.
53 changes: 15 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,36 @@ jobs:
release:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
if: startsWith(github.repository, 'zzzgydi')
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri

- name: Install Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16
node-version: "16"
cache: "yarn"

- name: Install Dependencies (ubuntu only)
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
- 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 and check
run: |
yarn install --network-timeout 1000000
yarn install --network-timeout 1000000 --frozen-lockfile
yarn run check
- name: Tauri build
Expand All @@ -78,7 +62,7 @@ jobs:
prerelease: true

- name: Portable Bundle
if: matrix.os == 'windows-latest'
if: startsWith(matrix.os, 'windows-')
# rebuild with env settings
run: |
yarn build
Expand All @@ -97,23 +81,16 @@ jobs:
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Get yarn cache dir path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
uses: actions/checkout@v3

- name: Yarn Cache
uses: actions/cache@v2
id: yarn-cache
- name: Install Node
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: "16"
cache: "yarn"

- name: Yarn install
run: yarn install
run: yarn install --network-timeout 1000000 --frozen-lockfile

- name: Release updater file
run: yarn run updater
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,16 @@ jobs:
if: startsWith(github.repository, 'zzzgydi')
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- 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
- name: Install Node
uses: actions/setup-node@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version: "16"
cache: "yarn"

- name: Yarn install
run: yarn install
run: yarn install --network-timeout 1000000 --frozen-lockfile

- name: Release updater file
run: yarn run updater
Expand Down

0 comments on commit 241b22a

Please sign in to comment.