-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 1.06 KB
/
Copy pathrelease-auth-check.yml
File metadata and controls
30 lines (26 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Release Authentication Check
on:
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
npm-auth:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Verify OIDC publishing readiness
run: |
npm install --global npm@11.20.0
node -e "const [major, minor] = process.versions.node.split('.').map(Number); if (major < 22 || (major === 22 && minor < 14)) process.exit(1)"
if [ -z "${ACTIONS_ID_TOKEN_REQUEST_URL:-}" ] || [ -z "${ACTIONS_ID_TOKEN_REQUEST_TOKEN:-}" ]; then
echo "::error::GitHub OIDC token request is unavailable to this workflow."
exit 2
fi
npm --version
npm view monsqlize dist-tags.latest --registry=https://registry.npmjs.org/
echo "Runner OIDC is ready. Confirm monsqlize trusts devcodex-labs/monSQLize publish.yml with npm publish allowed in npm package settings before tagging."