Skip to content

Commit a35f68e

Browse files
authored
refactor: introduce trusted publishing (#1269)
* refactor: Remove NPM token setting from publish script Removed the line setting the NPM authentication token. * Update 03-publish-packages.yml * Update Node.js version in .nvmrc to 24 * Update release.yml * refactor: running prettier * Remove provenance flag from npm publish command Removed the '--provenance' flag from the npm publish command.
1 parent 5a6cb72 commit a35f68e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/scripts/publish-npm.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ do
3535
echo "🔑 Authenticated with GITHUB"
3636
elif [[ $REGISTRY == 'NPM' ]]; then
3737
npm config set @db-ui:registry https://registry.npmjs.org/
38-
npm set //registry.npmjs.org/:_authToken "$NPM_TOKEN"
3938
echo "🔑 Authenticated with NPM"
4039
else
4140
echo "Could not authenticate with $REGISTRY"
4241
exit 1
4342
fi
4443
# https://docs.npmjs.com/generating-provenance-statements#example-github-actions-workflow
45-
npm publish --tag "$TAG" db-ui-core-"$VALID_SEMVER_VERSION".tgz --provenance
44+
npm publish --tag "$TAG" db-ui-core-"$VALID_SEMVER_VERSION".tgz
4645
done

.github/workflows/03-publish-packages.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
PRE_RELEASE: ${{ inputs.preRelease }}
5151
VALID_SEMVER_VERSION: ${{ inputs.version }}
5252
GITHUB_COMMITISH: ${{ github.event.release.target_commitish }}
53-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5453
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5554

5655
- name: ⬆ Upload Package Artifact db-ui-core

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
uses: ./.github/workflows/03-publish-packages.yml
3636
needs: [lint, test, build, get-publish-version]
3737
secrets: inherit
38+
permissions:
39+
id-token: write # Required for OIDC
3840
with:
3941
release: ${{ needs.get-publish-version.outputs.release }}
4042
preRelease: ${{ needs.get-publish-version.outputs.preRelease }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

0 commit comments

Comments
 (0)