Skip to content

Commit 4176d08

Browse files
authored
ci: migrate npm releases to trusted publishing (#590)
1 parent a59d991 commit 4176d08

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,42 @@ jobs:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 10
1212
concurrency: changes-deploys
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
id-token: write
1318

1419
steps:
15-
- name: Checkout Maker master branch
16-
uses: actions/checkout@v2
20+
- name: Checkout Maker
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 0
1724

1825
- name: Setup Node.js
19-
uses: actions/setup-node@v2
26+
uses: actions/setup-node@v6
2027
with:
21-
node-version-file: '.nvmrc'
22-
# commenting out line which is erroring atm
23-
# maybe uncomment this in the future
24-
# cache: 'npm'
28+
node-version: '24'
2529

2630
- name: Install dependencies
2731
run: npm ci
2832

2933
- name: Release
3034
env:
3135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
33-
run: npx semantic-release@19
36+
NODE_OPTIONS: --openssl-legacy-provider
37+
run: npx semantic-release@25
3438

3539
- name: Checkout Maker deploys branch in .dist directory
36-
uses: actions/checkout@v2
40+
uses: actions/checkout@v6
3741
with:
3842
repository: square/maker
3943
ref: deploys
4044
path: .dist
4145

4246
- name: Build & deploy Styleguide & Lab
47+
env:
48+
NODE_OPTIONS: --openssl-legacy-provider
4349
run: |
4450
cd .dist
4551
git config user.name github-actions

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"version": "0.0.0-semantic-release",
44
"description": "Maker Design System by Square",
55
"license": "Apache-2.0",
6+
"repository": {
7+
"type": "git",
8+
"url": "git+https://github.com/square/maker.git"
9+
},
610
"files": [
711
"components",
812
"utils"

0 commit comments

Comments
 (0)