@gowri48/npmpublish 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,45 @@
1
+ name: Test restore cache
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ jobs:
6
+ build:
7
+ strategy:
8
+ fail-fast: false
9
+ matrix:
10
+
11
+ os: ['ubuntu-latest','macos-latest','windows-latest', 'ubuntu-24.04-arm', 'windows-11-arm', 'macos-15-intel']
12
+
13
+
14
+ runs-on: ${{ matrix.os }}
15
+
16
+ steps:
17
+ - name: Checkout repository
18
+ uses: actions/checkout@v6
19
+
20
+ # - uses: pnpm/action-setup@v6
21
+ # with:
22
+ # version: 10
23
+
24
+ - name: Setup Node.js
25
+ uses: actions/setup-node@v6
26
+ with:
27
+ node-version: '24'
28
+
29
+
30
+ - name: Normalize runner architecture
31
+ shell: bash
32
+ run: echo "ARCH=$(echo '${{ runner.arch }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
33
+
34
+ - name: Output of cache path
35
+ id: cachepath
36
+ shell: bash
37
+ run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
38
+
39
+
40
+ - name: Restore Node cache
41
+ uses: actions/cache/restore@v5
42
+ with:
43
+ path: ${{ steps.cachepath.outputs.path }}
44
+ key: node-cache-${{ runner.os }}-${{ env.ARCH }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
45
+ - run: pnpm install --frozen-lockfile
@@ -4,28 +4,26 @@ on:
4
4
 
5
5
 
6
6
  permissions:
7
+ id-token: write # Required for OIDC
7
8
  contents: read
8
- id-token: write
9
-
10
9
 
11
10
  jobs:
12
11
  publish:
13
12
  runs-on: ubuntu-latest
13
+ environment: release
14
14
  steps:
15
- - uses: actions/checkout@v6
16
-
17
- - uses: actions/setup-node@v6
18
- with:
19
- node-version: '24'
20
- registry-url: 'https://registry.npmjs.org'
21
- cache: 'npm'
22
-
23
- # # Use a read-only token for installing dependencies
24
- # - run: npm ci
25
-
26
-
27
- # Publish uses OIDC - no token needed
28
- - run: npm publish --loglevel verbose
29
- env:
30
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31
-
15
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
16
+
17
+ - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
18
+
19
+ - name: Use Node.js 24
20
+ uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
21
+ with:
22
+ node-version: "24"
23
+ registry-url: "https://registry.npmjs.org"
24
+ package-manager-cache: false
25
+
26
+ - run: pnpm install
27
+
28
+ - name: Publish
29
+ run: pnpm publish --recursive --no-git-checks --verbose
Binary file