@gowri48/npmpublish 1.4.0 → 1.4.1
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.
|
@@ -1,20 +1,62 @@
|
|
|
1
1
|
name: testing_1477_oidc
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
4
5
|
|
|
5
6
|
permissions:
|
|
6
|
-
id-token: write
|
|
7
7
|
contents: read
|
|
8
|
-
|
|
8
|
+
id-token: write # Required to trigger OIDC token exchange
|
|
9
|
+
|
|
9
10
|
jobs:
|
|
10
|
-
|
|
11
|
+
detect-oidc-precedence:
|
|
11
12
|
runs-on: ubuntu-latest
|
|
12
13
|
steps:
|
|
13
|
-
-
|
|
14
|
-
|
|
14
|
+
- name: Checkout package to publish
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
path: package # ← your repro-setup-node-oidc package lives here
|
|
18
|
+
|
|
19
|
+
- name: Checkout custom npm-cli fork (for logging)
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
repository: chiranjib-swain/npm-cli
|
|
23
|
+
ref: envReplace
|
|
24
|
+
path: npm-cli # ← forked npm CLI lives here
|
|
25
|
+
|
|
26
|
+
- name: Set up Node.js 24 with registry-url
|
|
27
|
+
uses: actions/setup-node@v4
|
|
15
28
|
with:
|
|
16
29
|
node-version: '24'
|
|
17
|
-
registry-url: 'https://
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
30
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
31
|
+
|
|
32
|
+
- name: Install & link custom npm CLI
|
|
33
|
+
run: |
|
|
34
|
+
cd npm-cli
|
|
35
|
+
npm install
|
|
36
|
+
npm install -g . # Link the custom npm CLI globally
|
|
37
|
+
- name: Show environment state before publish
|
|
38
|
+
run: |
|
|
39
|
+
echo "=== Token State ==="
|
|
40
|
+
echo "NODE_AUTH_TOKEN=${NODE_AUTH_TOKEN}"
|
|
41
|
+
echo "NPM_CONFIG_USERCONFIG=${NPM_CONFIG_USERCONFIG}"
|
|
42
|
+
echo ""
|
|
43
|
+
echo "=== .npmrc Contents ==="
|
|
44
|
+
cat "${NPM_CONFIG_USERCONFIG}"
|
|
45
|
+
echo ""
|
|
46
|
+
echo "=== OIDC Env Vars ==="
|
|
47
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_URL=${ACTIONS_ID_TOKEN_REQUEST_URL:-(not set)}"
|
|
48
|
+
echo "ACTIONS_ID_TOKEN_REQUEST_TOKEN=${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-(not set)}"
|
|
49
|
+
- name: Run npm publish with verbose logging # ← key fix here
|
|
50
|
+
working-directory: package
|
|
51
|
+
run: |
|
|
52
|
+
npm publish --access public --provenance --loglevel verbose 2>&1 | tee /tmp/publish.log || true
|
|
53
|
+
- name: Extract DETECT log lines only
|
|
54
|
+
run: |
|
|
55
|
+
echo "=== DETECTION LOG LINES ==="
|
|
56
|
+
grep "\[DETECT\]" /tmp/publish.log || echo "No [DETECT] lines found"
|
|
57
|
+
echo ""
|
|
58
|
+
echo "=== OIDC-related lines ==="
|
|
59
|
+
grep -i "oidc" /tmp/publish.log || echo "No OIDC lines found"
|
|
60
|
+
echo ""
|
|
61
|
+
echo "=== Auth error lines ==="
|
|
62
|
+
grep -E "E401|ENEEDAUTH|401 Unauthorized" /tmp/publish.log || echo "No auth errors found"
|