Skip to content

Commit 40d8e56

Browse files
authored
Merge pull request #578 from code0-tech/577-setup-trusted-publishing
Setup trusted publishing for graphql types npm package
2 parents 1b2d948 + 0a52180 commit 40d8e56

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
GLPA_C0_GH_REF: ${{ github.ref }}
3030
GLPA_C0_GH_REF_NAME: ${{ github.ref_name }}
3131
GLPA_C0_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
GLPA_C0_NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
3332

3433
- name: Find existing comment
3534
uses: peter-evans/find-comment@v3

.gitlab-ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,15 @@ npm-types:generate-graphql:
142142

143143

144144
.npm-types:publish-graphql:
145-
image: node:22.18.0
145+
image: node:24.8.0
146146
needs:
147147
- npm-types:generate-graphql
148148
variables:
149-
NODE_AUTH_TOKEN: $C0_NODE_AUTH_TOKEN
150149
GIT_STRATEGY: empty
150+
NPM_CONFIG_PROVENANCE: "false"
151+
id_tokens:
152+
NPM_ID_TOKEN:
153+
aud: "npm:registry.npmjs.org"
151154
script:
152155
- cd tooling/graphql/types
153156
- npm ci
@@ -161,7 +164,7 @@ npm-types:publish-graphql-dry-run:
161164
stage: test
162165
script:
163166
- !reference [.npm-types:publish-graphql, script]
164-
- npm publish --dry-run
167+
- npm publish --dry-run --tag latest
165168
artifacts:
166169
expire_in: 7 days
167170
paths:
@@ -175,7 +178,7 @@ npm-types:publish-graphql:
175178
stage: publish
176179
script:
177180
- !reference [ .npm-types:publish-graphql, script ]
178-
- npm publish
181+
- npm publish --tag latest
179182
rules:
180183
- if: $C0_GH_REF_NAME == "main"
181184
when: manual

0 commit comments

Comments
 (0)