Skip to content

Commit 56423e5

Browse files
committed
ci: harden npm trusted publishing workflow
1 parent a11d49a commit 56423e5

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
# Tuesdays at 14:45 UTC (10:45 EST)
1010
- cron: 45 14 * * 1
1111

12+
permissions:
13+
contents: read
14+
1215
concurrency:
1316
group: ${{ github.workflow }}-${{ github.ref }}
1417
cancel-in-progress: true
@@ -46,32 +49,32 @@ jobs:
4649
- { svelte: '5', node: '22', check: 'typecheck' }
4750

4851
steps:
49-
- name: ⬇️ Checkout repo
52+
- name: Checkout repo
5053
uses: actions/checkout@v6
5154

52-
- name: 🧱 Setup pnpm
55+
- name: Setup pnpm
5356
uses: pnpm/action-setup@26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a # v6.0.4
5457
with:
5558
standalone: ${{ matrix.node == '16' }}
5659

57-
- name: Setup node
60+
- name: Setup node
5861
uses: actions/setup-node@v6
5962
with:
6063
node-version: ${{ matrix.node }}
6164

62-
- name: 📥 Install dependencies
65+
- name: Install dependencies
6366
run: pnpm run install:${{ matrix.svelte }}
6467

65-
- name: 📥 Download build
68+
- name: Download build
6669
uses: actions/download-artifact@v8
6770
with:
6871
name: build
6972
path: packages
7073

71-
- name: ▶️ Run ${{ matrix.check }}
74+
- name: Run ${{ matrix.check }}
7275
run: pnpm run ${{ matrix.check }}
7376

74-
- name: ⬆️ Upload coverage report
77+
- name: Upload coverage report
7578
if: ${{ startsWith(matrix.check, 'test:') }}
7679
uses: codecov/codecov-action@v6
7780
with:
@@ -81,24 +84,24 @@ jobs:
8184
build:
8285
runs-on: ubuntu-latest
8386
steps:
84-
- name: ⬇️ Checkout repo
87+
- name: Checkout repo
8588
uses: actions/checkout@v6
8689

87-
- name: 🧱 Setup pnpm
90+
- name: Setup pnpm
8891
uses: pnpm/action-setup@26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a # v6.0.4
8992

90-
- name: Setup node
93+
- name: Setup node
9194
uses: actions/setup-node@v6
9295
with:
9396
node-version: 22
9497

95-
- name: 📥 Install dependencies
98+
- name: Install dependencies
9699
run: pnpm install
97100

98-
- name: 🏗️ Build types and documentation
101+
- name: Build types and documentation
99102
run: pnpm run build
100103

101-
- name: ⬆️ Upload build
104+
- name: Upload build
102105
uses: actions/upload-artifact@v7
103106
with:
104107
name: build
@@ -119,24 +122,24 @@ jobs:
119122
pull-requests: write # released pull requests comments
120123
id-token: write # trusted publishing and npm provenance
121124
steps:
122-
- name: ⬇️ Checkout repo
125+
- name: Checkout repo
123126
uses: actions/checkout@v6
124127

125-
- name: 🧱 Setup pnpm
128+
- name: Setup pnpm
126129
uses: pnpm/action-setup@26f6d4f2c533a43e6b5da0b4a5dd983f98f7b49a # v6.0.4
127130

128-
- name: Setup node
131+
- name: Setup node
129132
uses: actions/setup-node@v6
130133
with:
131134
node-version: 24
132135

133-
- name: 📥 Download build
136+
- name: Download build
134137
uses: actions/download-artifact@v8
135138
with:
136139
name: build
137140
path: packages
138141

139-
- name: 🚀 Release
142+
- name: Release
140143
run: |
141144
pnpm \
142145
--package="@anolilab/multi-semantic-release@3" \

0 commit comments

Comments
 (0)