Skip to content

Commit d7a8f98

Browse files
committed
fix: updated gh workflows
1 parent 3da2cc2 commit d7a8f98

File tree

6 files changed

+64
-31
lines changed

6 files changed

+64
-31
lines changed

.github/workflows/audit.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,19 @@ jobs:
3232

3333
- name: Get PNPM store directory
3434
shell: bash
35-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
35+
run: |
36+
echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV
3637
3738
- name: Setup PNPM cache
3839
uses: actions/cache@v4
3940
with:
40-
path: ${{ env.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42-
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
41+
path: ${{ env.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
4445
4546
- name: Install dependencies
46-
run: pnpm install
47+
run: pnpm install --no-frozen-lockfile
4748

4849
- name: Run pnpm audit
49-
run: pnpm audit
50+
run: pnpm audit

.github/workflows/gen-deploy-docs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929

3030
- name: Get PNPM store directory
3131
shell: bash
32-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
run: |
33+
echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV
3334
3435
- name: Setup PNPM cache
3536
uses: actions/cache@v4
@@ -40,7 +41,7 @@ jobs:
4041
${{ runner.os }}-pnpm-store-
4142
4243
- name: Install dependencies
43-
run: pnpm install
44+
run: pnpm install --no-frozen-lockfile
4445

4546
- name: Install gh-pages globally
4647
run: pnpm add -g gh-pages
@@ -77,4 +78,4 @@ jobs:
7778

7879
- name: Deploy to GitHub Pages
7980
id: deployment
80-
uses: actions/deploy-pages@v4
81+
uses: actions/deploy-pages@v4

.github/workflows/node.js.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@ jobs:
3333

3434
- name: Get PNPM store directory
3535
shell: bash
36-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36+
run: |
37+
echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV
3738
3839
- name: Setup PNPM cache
3940
uses: actions/cache@v4
4041
with:
41-
path: ${{ env.STORE_PATH }}
42-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43-
restore-keys: |
44-
${{ runner.os }}-pnpm-store-
42+
path: ${{ env.STORE_PATH }}
43+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pnpm-store-
4546
4647
- name: Install dependencies
47-
run: pnpm install
48+
run: pnpm install --no-frozen-lockfile
4849

4950
- name: Build
5051
run: pnpm run build
@@ -53,4 +54,4 @@ jobs:
5354
run: pnpm run fmt:check
5455

5556
- name: Run Tests
56-
run: pnpm test
57+
run: pnpm test

.github/workflows/npm-publish.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,49 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v4
1717

18-
- uses: actions/setup-node@v4
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
1920
with:
2021
node-version: 18
2122
registry-url: https://registry.npmjs.org/
2223

24+
- name: Install PNPM
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 9
28+
run_install: false
29+
30+
- name: Enable Corepack
31+
run: corepack enable
32+
33+
- name: Get PNPM store directory
34+
shell: bash
35+
run: |
36+
echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV
37+
38+
- name: Setup PNPM cache
39+
uses: actions/cache@v4
40+
with:
41+
path: ${{ env.STORE_PATH }}
42+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
43+
restore-keys: |
44+
${{ runner.os }}-pnpm-store-
45+
2346
- name: Extract tag
2447
id: get_tag
25-
run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/}
26-
env:
27-
GITHUB_REF: ${{ github.ref }}
48+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
49+
50+
- name: Install dependencies
51+
run: pnpm install --no-frozen-lockfile
2852

29-
- run: ./scripts/publish.sh ${{ steps.get_tag.outputs.TAG }}
53+
- name: Run publish script
54+
run: ./scripts/publish.sh ${{ steps.get_tag.outputs.TAG }}
3055
env:
3156
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
3257

33-
- uses: softprops/action-gh-release@v1
58+
- name: Upload release assets
59+
uses: softprops/action-gh-release@v1
3460
with:
3561
files: |
3662
dist/bundle.js
37-
dist/bundle.min.js
63+
dist/bundle.min.js

.github/workflows/unit-test.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,22 @@ jobs:
3636

3737
- name: Get PNPM store directory
3838
shell: bash
39-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
39+
run: |
40+
echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV
4041
4142
- name: Setup PNPM cache
4243
uses: actions/cache@v4
4344
with:
44-
path: ${{ env.STORE_PATH }}
45-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
46-
restore-keys: |
47-
${{ runner.os }}-pnpm-store-
45+
path: ${{ env.STORE_PATH }}
46+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-pnpm-store-
4849
4950
- name: Install dependencies
50-
run: pnpm install --frozen-lockfile
51+
run: pnpm install
5152

5253
- name: Execute unit tests
5354
run: |
5455
pnpm run build
5556
pnpm run fmt:check
56-
pnpm run test
57+
pnpm run test

pnpm-workspace.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
packages:
2+
- "."
3+
14
overrides:
25
form-data@>=4.0.0 <4.0.4: '>=4.0.4'
36
minimatch@<3.0.5: '>=3.0.5'

0 commit comments

Comments
 (0)