Skip to content

Commit

Permalink
chore: test: use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
keiko233 committed Nov 13, 2023
1 parent 575a14e commit 890f55c
Show file tree
Hide file tree
Showing 9 changed files with 3,933 additions and 2,475 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "yarn"

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Delete current release assets
if: startsWith(matrix.os, 'ubuntu-')
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: alpha
token: ${{ secrets.GH_TOKEN }}
tag: dev
fail-if-no-assets: false
fail-if-no-release: false
assets: |
Expand All @@ -59,10 +64,10 @@ jobs:
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf openssl
- name: Yarn install and check
- name: Pnpm install and check
run: |
yarn install --network-timeout 1000000 --frozen-lockfile
yarn run check
pnpm i
pnpm check
- name: Tauri build
uses: tauri-apps/tauri-action@v0
Expand All @@ -76,13 +81,14 @@ jobs:
releaseBody: "More new features are now supported."
releaseDraft: false
prerelease: true
tauriScript: pnpm
args: -f default-meta

- name: Portable Bundle
if: matrix.os == 'windows-latest'
run: |
yarn build -f default-meta
yarn run portable
pnpm build -f default-meta
pnpm portable
env:
TAG_NAME: dev
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn pretty-quick --staged
pnpm pretty-quick --staged
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,31 @@ open the terminal and run `sudo xattr -r -d com.apple.quarantine /Applications/C
You should install Rust and Nodejs, see [here](https://tauri.app/v1/guides/getting-started/prerequisites) for more details. Then install Nodejs packages.

```shell
yarn install
pnpm i
```

Then download the clash binary... Or you can download it from [clash premium release](https://github.com/Dreamacro/clash/releases/tag/premium) and rename it according to [tauri config](https://tauri.studio/docs/api/config/#tauri.bundle.externalBin).

```shell
# force update to latest version
# yarn run check --force
# pnpm run check --force

yarn run check
pnpm run check
```

Then run

```shell
yarn dev
pnpm dev

# run it in another way if app instance exists
yarn dev:diff
pnpm dev:diff
```

Or you can build it

```shell
yarn build
pnpm build
```

## Todos
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
"@types/js-cookie": "^3.0.2",
"@types/lodash": "^4.14.180",
"@types/lodash-es": "^4.17.7",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.0.11",
"@types/react-transition-group": "^4.4.9",
"@vitejs/plugin-react": "^4.1.0",
"adm-zip": "^0.5.9",
"cross-env": "^7.0.3",
Expand Down
Loading

0 comments on commit 890f55c

Please sign in to comment.