Skip to content

Commit

Permalink
ci: build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ChefJerry committed Sep 21, 2023
1 parent bd1e02f commit 2e92d7e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store

jobs:
version:
timeout-minutes: 15
Expand All @@ -28,8 +28,19 @@ jobs:
- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc

- name: setup pnpm config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --ignore-scripts
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
strict-peer-dependecies=false
node=18
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"test": "jest",
"clean": "rimraf dist",
"changeset:version": "changeset status && changeset version",
"changeset:publish": "pnpm publish -r"
"changeset:publish": "pnpm build && changeset publish"
},
"simple-git-hooks": {
"pre-commit": "pnpm test"
Expand Down

0 comments on commit 2e92d7e

Please sign in to comment.