@@ -7,26 +7,32 @@ concurrency:
77 cancel-in-progress : true
88
99jobs :
10- lint :
11- name : Lint
10+ test-check :
11+ name : Lint and check types
1212 runs-on : ubuntu-latest
1313 steps :
1414 - name : ⬇️ Set up code
1515 uses : actions/checkout@v4
1616 with :
1717 show-progress : false
1818
19+ - name : 📦 Setup PNPM
20+ uses : pnpm/action-setup@v4
21+
1922 - name : ⎔ Setup Node.js
2023 uses : actions/setup-node@v4
2124 with :
22- node-version : lts/*
23- cache : npm
25+ node-version-file : ' .node-version '
26+ cache : pnpm
2427
2528 - name : 📥 Download dependencies
26- run : npm ci
29+ run : pnpm install
2730
2831 - name : 🧵 Lint
29- run : npm run lint
32+ run : pnpm run lint
33+
34+ - name : 🧪 Check types
35+ run : pnpm run check
3036
3137 test-unit :
3238 name : Unit Tests
@@ -37,17 +43,20 @@ jobs:
3743 with :
3844 show-progress : false
3945
46+ - name : 📦 Setup PNPM
47+ uses : pnpm/action-setup@v4
48+
4049 - name : ⎔ Setup Node.js
4150 uses : actions/setup-node@v4
4251 with :
43- node-version : lts/*
44- cache : npm
52+ node-version-file : ' .node-version '
53+ cache : pnpm
4554
4655 - name : 📥 Download dependencies
47- run : npm ci
56+ run : pnpm install
4857
4958 - name : 🧪 Run tests
50- run : npm test
59+ run : pnpm test
5160
5261 - name : 📤 Report coverage to Codecov
5362 uses : codecov/codecov-action@v5
@@ -57,34 +66,41 @@ jobs:
5766 build :
5867 name : Commit Release Assets
5968 runs-on : ubuntu-latest
69+ needs : [test-check, test-unit]
6070 if : ${{ github.event.sender.login == 'ugrc-release-bot[bot]' }}
6171 permissions :
6272 contents : write
6373 steps :
6474 - name : 🪙 Convert token
6575 uses : actions/create-github-app-token@v2
66- id : generate_token
76+ id : generate-token
6777 with :
6878 app-id : ${{ secrets.UGRC_RELEASE_BOT_APP_ID }}
6979 private-key : ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }}
7080
7181 - name : ⬇️ Set up code
7282 uses : actions/checkout@v4
7383 with :
74- ref : ${{ github.head_ref }}
75- token : ${{ steps.generate_token.outputs.token }}
7684 show-progress : false
85+ ref : ${{ github.head_ref }}
86+ token : ${{ steps.generate-token.outputs.token }}
87+
88+ - name : 📦 Setup PNPM
89+ uses : pnpm/action-setup@v4
7790
7891 - name : ⎔ Setup Node.js
7992 uses : actions/setup-node@v4
8093 with :
81- node-version : lts/*
82- cache : npm
94+ node-version-file : ' .node-version '
95+ cache : pnpm
8396
8497 - name : 📥 Download dependencies
85- run : npm ci
98+ run : pnpm install
99+
100+ - name : 🏗️ Build release assets
101+ run : pnpm run build
86102
87- - name : 🏗️ Commit and push if needed
103+ - name : 📤 Commit and push if needed
88104 run : |
89105 git config user.name "${{ secrets.UGRC_RELEASE_BOT_NAME }}"
90106 git config user.email "${{ secrets.UGRC_RELEASE_BOT_EMAIL }}"
0 commit comments