Skip to content

Commit 4c6c9ec

Browse files
authored
Merge pull request #19 from ScrapingBee/add-trusted-publisher-config
[SCR-85] Added Trusted Publisher Configuration
2 parents 4b43995 + 44a627e commit 4c6c9ec

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

.github/workflows/publish.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
name: npm publish
1+
name: Publish Package
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
610

711
jobs:
8-
publish:
9-
runs-on: ubuntu-latest
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: 14.x
20+
registry-url: 'https://registry.npmjs.org'
1021

11-
steps:
12-
- uses: actions/checkout@v2
13-
- name: Use Node.js 14.x
14-
uses: actions/setup-node@v4.4.0
15-
with:
16-
node-version: 14.x
17-
cache: 'npm'
18-
registry-url: 'https://registry.npmjs.org'
19-
- run: npm ci
20-
- run: npm run build
21-
- run: npm publish
22-
env:
23-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
# Ensure npm 11.5.1 or later is installed
23+
- name: Update npm
24+
run: npm install -g npm@latest
25+
- run: npm ci
26+
- run: npm run build --if-present
27+
- run: npm publish

0 commit comments

Comments
 (0)