Skip to content

Commit 3670a52

Browse files
author
adil.rakhaliyev
committed
update: workflow npm commands updated and publish configured for OIDC
1 parent e659aa3 commit 3670a52

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

.github/workflows/deploy-to-artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
ref: ${{steps.prep.outputs.sha}}
3939
- run: |
40-
npm i
40+
npm ci
4141
npx gulp build
4242
npm pack
4343
- id: package-name

.github/workflows/license-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
node-version: latest
2727

2828
- name: Install dependencies
29-
run: npm install
29+
run: npm ci
3030

3131
- name: Run Gulp build
3232
run: npx gulp build
@@ -35,4 +35,4 @@ jobs:
3535
run: npm pack
3636

3737
- name: Install the application and check licenses
38-
run: mkdir temp && cd temp && npm init -y && npm install ../*.tgz && npx gulp check-licenses
38+
run: mkdir temp && cd temp && npm init -y && npm ci ../*.tgz && npx gulp check-licenses

.github/workflows/publish.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,43 @@ on:
44
release:
55
types: [published]
66

7+
permissions:
8+
id-token: write # Required for OIDC (Trusted Publishing)
9+
contents: read
10+
711
jobs:
812
npm-publish:
913
if: ${{ !github.event.release.draft }}
1014
runs-on: ubuntu-latest
11-
environment: release
15+
environment: npmjs
1216
steps:
13-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1418
with:
1519
ref: ${{ github.event.release.target_commitish }}
1620
- run: git fetch --force --tags
17-
- uses: actions/setup-node@v3
21+
- uses: actions/setup-node@v4
1822
with:
19-
node-version: 18
23+
node-version: 24
2024
registry-url: 'https://registry.npmjs.org'
21-
- run: npm install
25+
- run: npm ci
2226
- run: npm run publish-please-only
23-
env:
24-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2527
docker-publish:
2628
needs: npm-publish
2729
runs-on: ubuntu-latest
2830
environment: release
2931
steps:
30-
- uses: actions/checkout@v3
32+
- uses: actions/checkout@v4
3133
with:
3234
ref: ${{ github.event.release.target_commitish }}
3335
- run: git fetch --force --tags
34-
- uses: actions/setup-node@v3
36+
- uses: actions/setup-node@v4
3537
with:
36-
node-version: 18
38+
node-version: 24
3739
registry-url: 'https://registry.npmjs.org'
3840
- uses: docker/login-action@v1
3941
with:
4042
username: ${{ secrets.DOCKERHUB_USERNAME }}
4143
password: ${{ secrets.DOCKERHUB_TOKEN }}
42-
- run: npm install
44+
- run: npm ci
4345
- run: npx gulp build
4446
- run: gulp docker-publish
45-
env:
46-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/test-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
18-
- run: npm i --package-lock-only
18+
- run: npm ci --package-lock-only
1919
- run: npm audit --production

.github/workflows/test-functional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
${{ runner.os }}-node-
132132
- run: npm ci
133133
if: ${{ !inputs.is-docker }}
134-
- run: npm install
134+
- run: npm ci
135135
if: ${{ inputs.is-docker }}
136136

137137
- name: Add permissions on MacOS

.github/workflows/test-server.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
${{ runner.os }}-node-
5757
- run: npm ci
5858
if: ${{ !inputs.is-docker }}
59-
- run: npm install
59+
- run: npm ci
6060
if: ${{ inputs.is-docker }}
6161

6262
- run: ${{ inputs.test-script }}

0 commit comments

Comments
 (0)