Skip to content

Commit 3624e4d

Browse files
committed
ci: use-trusted-publishers
1 parent 4fbb22c commit 3624e4d

2 files changed

Lines changed: 1 addition & 32 deletions

File tree

.github/workflows/publish.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ env:
88
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
99
NX_CLOUD_DISTRIBUTED_EXECUTION: true
1010
PNPM_CACHE_FOLDER: .pnpm-store
11-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
1211
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1312
CI: true
1413

@@ -80,8 +79,6 @@ jobs:
8079
# See https://github.com/changesets/action/issues/147
8180
HOME: ${{ github.workspace }}
8281
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
83-
NPM_CONFIG_PROVENANCE: 'true'
84-
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
8582

8683
- name: Send GitHub Action data to a Slack workflow
8784
if: steps.changesets.outputs.published == 'true'

.github/workflows/snapshot.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ name: Snapshots
22
on:
33
workflow_dispatch:
44
inputs:
5-
registry:
6-
description: 'Npm Registry or Private Registry'
7-
required: false
8-
default: 'https://registry.npmjs.org/'
9-
type: choice
10-
options:
11-
- https://registry.npmjs.org/
12-
- https://npm.petrov.ca
135
branch:
146
description: 'Branch to publish from'
157
required: false
@@ -21,7 +13,6 @@ env:
2113
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
2214
NX_CLOUD_DISTRIBUTED_EXECUTION: true
2315
PNPM_CACHE_FOLDER: .pnpm-store
24-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
2516
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2617
HUSKY: 0
2718

@@ -80,29 +71,10 @@ jobs:
8071
./**/.playwright/**
8172
retention-days: 30
8273

83-
- name: Update npmrc
84-
run: |
85-
cat << EOF > ".npmrc"
86-
//registry.npmjs.org/:_authToken=$NPM_TOKEN
87-
//npm.petrov.ca/:_authToken=$NPM_TOKEN
88-
EOF
89-
env:
90-
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
9174
- name: Version Packages as Beta
9275
run: pnpm changeset version --snapshot beta
9376
env:
9477
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
9578

9679
- name: Publish packages as beta
97-
if: ${{ inputs.registry == 'https://registry.npmjs.org/' }}
98-
run: pnpm publish -r --tag beta --no-git-checks --registry ${{ inputs.registry }}
99-
env:
100-
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
101-
NPM_CONFIG_PROVENANCE: 'true' # make sure provenance is working on beta releases to npm
102-
103-
- name: Publish packages as beta
104-
if: ${{ inputs.registry != 'https://registry.npmjs.org/' }}
105-
run: pnpm publish -r --tag beta --no-git-checks --registry ${{ inputs.registry }}
106-
env:
107-
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
108-
NPM_CONFIG_PROVENANCE: false # verdaccio doesn't support provenance
80+
run: pnpm publish -r --tag beta --no-git-checks

0 commit comments

Comments
 (0)