Skip to content

Commit f7d9a8c

Browse files
authored
Upgrade GitHub actions (#75)
* Upgrade Github Actions library versions to match package-template * Enable local dev for Node 22 and 23
1 parent d59ee2f commit f7d9a8c

File tree

5 files changed

+18
-29
lines changed

5 files changed

+18
-29
lines changed

.github/reusable-workflows/setup-repo/action.yml

+8-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Setup repo (reusable)
2-
description: Standardized workspace setup for package-template
2+
description: Standardized workspace setup for limited-cache
33
inputs:
44
node-version:
55
description: NodeJS version, for actions/setup-node
@@ -12,36 +12,25 @@ inputs:
1212
runs:
1313
using: composite
1414
steps:
15-
- uses: actions/[email protected]
15+
- uses: pnpm/[email protected]
16+
17+
- uses: actions/[email protected]
1618
if: ${{ inputs.node-version == 'nvmrc' }}
1719
with:
1820
node-version-file: .nvmrc
1921
registry-url: 'https://registry.npmjs.org'
20-
- uses: actions/[email protected]
22+
cache: 'pnpm'
23+
- uses: actions/[email protected]
2124
if: ${{ inputs.node-version != 'nvmrc' }}
2225
with:
2326
node-version: ${{ inputs.node-version }}
2427
registry-url: 'https://registry.npmjs.org'
28+
cache: 'pnpm'
2529

26-
- uses: oven-sh/setup-bun@v1.1.1
30+
- uses: oven-sh/setup-bun@v2.0.1
2731
with:
2832
bun-version: latest
2933

30-
- uses: pnpm/[email protected]
31-
32-
- name: Get pnpm store directory
33-
shell: bash
34-
run: |
35-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
36-
37-
- uses: actions/[email protected]
38-
name: Setup pnpm cache
39-
with:
40-
path: ${{ env.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
42-
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
44-
4534
- name: Remove lockfile to loosen dependency tree
4635
if: ${{ inputs.use-lockfile == 'false' }}
4736
shell: bash

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: [18.x, 20.x, 21.x]
14+
node-version: [18.x, 20.x, 22.x, latest]
1515

1616
steps:
17-
- uses: actions/checkout@v3.5.3
17+
- uses: actions/checkout@v4.1.7
1818
with:
1919
fetch-depth: 0
2020

@@ -32,7 +32,7 @@ jobs:
3232
pnpm run all:ci
3333
3434
- name: Report test coverage to coveralls.io
35-
uses: coverallsapp/github-action@master
35+
uses: coverallsapp/github-action@v2.3.0
3636
with:
3737
github-token: ${{ github.token }}
3838

@@ -44,7 +44,7 @@ jobs:
4444
package-name: [limited-cache]
4545

4646
steps:
47-
- uses: actions/checkout@v3.5.3
47+
- uses: actions/checkout@v4.1.7
4848

4949
- uses: ./.github/reusable-workflows/setup-repo
5050
with:
@@ -63,7 +63,7 @@ jobs:
6363
demo-name: [vite-react-app]
6464

6565
steps:
66-
- uses: actions/checkout@v3.5.3
66+
- uses: actions/checkout@v4.1.7
6767

6868
- uses: ./.github/reusable-workflows/setup-repo
6969
with:

.github/workflows/prepare-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
pull-requests: write
2525
id-token: write
2626
steps:
27-
- uses: actions/checkout@v3.5.3
27+
- uses: actions/checkout@v4.1.7
2828
with:
2929
fetch-depth: 0
3030

@@ -36,15 +36,15 @@ jobs:
3636
run: pnpm run release:prep
3737

3838
- name: Import GPG key
39-
uses: crazy-max/ghaction-import-gpg@v5
39+
uses: crazy-max/ghaction-import-gpg@v6.1.0
4040
with:
4141
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
4242
passphrase: ${{ secrets.PASSPHRASE }}
4343
git_user_signingkey: true
4444
git_commit_gpgsign: true
4545

4646
- name: Create pull request
47-
uses: peter-evans/create-pull-request@v5
47+
uses: peter-evans/create-pull-request@v6.1.0
4848
id: cpr
4949
with:
5050
branch: prepare-release

.github/workflows/publish-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
package-name: [limited-cache]
2525
steps:
26-
- uses: actions/checkout@v3.5.3
26+
- uses: actions/checkout@v4.1.7
2727
with:
2828
fetch-depth: 0
2929

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "https://github.com/spautz/"
1515
},
1616
"engines": {
17-
"node": "^18 || ^20 || ^21",
17+
"node": "^18 || ^20 || ^22 || ^23",
1818
"pnpm": "^8"
1919
},
2020
"packageManager": "[email protected]",

0 commit comments

Comments
 (0)