Skip to content

Commit c247141

Browse files
authored
Merge pull request #25 from CheckPointSW/chkp-nirm-patch-1
Update release.yml
2 parents c08da56 + a901b1d commit c247141

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
name: Publish Packages to npmjs
1+
name: Release
22
on:
3-
release:
4-
types: [published]
3+
push:
4+
branches: [main]
5+
workflow_dispatch:
6+
57
jobs:
6-
build-and-publish:
8+
release:
79
runs-on: ubuntu-latest
810
permissions:
9-
contents: read
11+
contents: write
12+
packages: write
1013
id-token: write
14+
pull-requests: write # Needed to create PRs
1115
steps:
1216
- uses: actions/checkout@v4
13-
17+
with:
18+
fetch-depth: 0
19+
1420
- uses: actions/setup-node@v4
1521
with:
16-
node-version: '22.x'
22+
node-version: '18'
1723
registry-url: 'https://registry.npmjs.org'
18-
19-
- name: Install dependencies
20-
run: npm install
21-
22-
- name: Build all packages
23-
run: npm run build --workspaces
24-
25-
- name: Configure npm for provenance
26-
run: |
27-
npm config set provenance true
28-
npm config set access public
29-
30-
- name: Create Release Pull Request or Publish to npm
31-
id: changesets
24+
25+
- run: npm ci
26+
27+
- name: Create Release Pull Request or Publish
3228
uses: changesets/action@v1
3329
with:
30+
# This script runs ONLY when publishing (Phase 2)
3431
publish: npm run release
32+
# This script runs ONLY when creating version PR (Phase 1)
33+
version: npm run version
3534
env:
3635
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)