Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 2ff1d88

Browse files
Copilotkentcdodds
andauthored
chore: Update GitHub Actions workflows to use trusted publishers and latest action versions (#265)
* Initial plan * Update GitHub Actions workflows to use trusted publishers Co-authored-by: kentcdodds <[email protected]> * Update node-version to use LTS aliases for future-proofing Co-authored-by: kentcdodds <[email protected]> * Update .github/workflows/validate.yml * Update .github/workflows/validate.yml * Apply suggestion from @kentcdodds --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: kentcdodds <[email protected]> Co-authored-by: Kent C. Dodds <[email protected]>
1 parent 152ae6a commit 2ff1d88

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.github/workflows/auto-format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
pull-requests: write
2121
steps:
2222
- name: 📥 Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424
with:
2525
token: ${{ secrets.GITHUB_TOKEN }}
2626
ref: ${{ github.head_ref || github.ref_name }}
2727

2828
- name: Setup Node.js
29-
uses: actions/setup-node@v4
29+
uses: actions/setup-node@v6
3030
with:
31-
node-version: 24
31+
node-version: lts/*
3232
cache: 'npm'
3333

3434
- name: Cache node_modules

.github/workflows/validate.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
node-version: [22, 24]
19+
node-version: [lts/-1, lts/*, latest]
2020

2121
steps:
2222
- name: 📥 Checkout
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2424

2525
- name: 🟢 Setup Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v4
26+
uses: actions/setup-node@v6
2727
with:
2828
node-version: ${{ matrix.node-version }}
2929
cache: 'npm'
@@ -62,14 +62,14 @@ jobs:
6262
strategy:
6363
matrix:
6464
os: [ubuntu-latest, windows-latest]
65-
node-version: [24]
65+
node-version: [lts/*]
6666

6767
steps:
6868
- name: 📥 Checkout
69-
uses: actions/checkout@v4
69+
uses: actions/checkout@v5
7070

7171
- name: 🟢 Setup Node.js ${{ matrix.node-version }}
72-
uses: actions/setup-node@v4
72+
uses: actions/setup-node@v6
7373
with:
7474
node-version: ${{ matrix.node-version }}
7575
cache: 'npm'
@@ -97,26 +97,31 @@ jobs:
9797
name: 🚀 Release
9898
needs: [build, e2e]
9999
runs-on: ubuntu-latest
100+
permissions:
101+
contents: write # to be able to publish a GitHub release
102+
id-token: write # to enable use of OIDC for npm provenance
103+
issues: write # to be able to comment on released issues
104+
pull-requests: write # to be able to comment on released pull requests
100105
if:
101106
${{ github.repository == 'kentcdodds/cross-env' &&
102107
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
103108
github.ref) && github.event_name == 'push' }}
104109
steps:
105110
- name: ⬇️ Checkout repo
106-
uses: actions/checkout@v4
111+
uses: actions/checkout@v5
107112

108113
- name: 🔄 Restore build output
109114
uses: actions/cache/restore@v4
110115
with:
111116
path: |
112117
dist/
113-
key: build-24-${{ github.sha }}
118+
key: build-lts/*-${{ github.sha }}
114119
fail-on-cache-miss: false
115120

116121
- name: 🚀 Release
117-
uses: cycjimmy/semantic-release-action@v4
122+
uses: cycjimmy/semantic-release-action@v5.0.2
118123
with:
119-
semantic_version: 24
124+
semantic_version: 25
120125
branches: |
121126
[
122127
'+([0-9])?(.{+([0-9]),x}).x',
@@ -128,4 +133,3 @@ jobs:
128133
]
129134
env:
130135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)