Skip to content

Commit 466d5fb

Browse files
authored
chore: v0.0.20 release; feat/ci: add NPM Trusted Publishing Support (#415)
1 parent 41322b3 commit 466d5fb

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# This workflow automatically publishes the package to NPM and GHCR when a new release is created.
2-
# Before, creating a new release, make sure to update the package version in package.json
3-
# and add a Granular Access Token (with read and write packages scope)
4-
# to the repository secrets with the name NPM_TOKEN.
5-
# Once, the release has been published remove it from the repository secrets.
2+
# Before, creating a new release, make sure to update the package version in package.json.
3+
# The NPM package is published using Trusted Publishers using OIDC (without a PAT) when a release is created
4+
# and the deployment is approved by an admin.
65

76
name: Publish
87
on:
@@ -14,9 +13,14 @@ jobs:
1413
publish-npm:
1514
runs-on: ubuntu-latest
1615
name: npm
16+
17+
environment:
18+
name: npm
19+
url: https://www.npmjs.com/package/tldr-lint
20+
1721
permissions:
1822
contents: read
19-
id-token: write
23+
id-token: write # Required for OIDC in NPM Trusted Publishing
2024

2125
steps:
2226
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -28,9 +32,7 @@ jobs:
2832
registry-url: 'https://registry.npmjs.org'
2933

3034
- run: npm ci
31-
- run: npm publish --provenance
32-
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
35+
- run: npm publish
3436

3537
publish-ghcr:
3638
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55

66
The format is based on [Keep a Changelog](https://keepachangelog.com).
77

8-
## [v0.0.20](https://github.com/tldr-pages/tldr-lint/compare/v0.0.19...v0.0.20)
8+
## [v0.0.20 - 2025-08-18](https://github.com/tldr-pages/tldr-lint/compare/v0.0.19...v0.0.20)
99

1010
### Added
1111

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tldr-lint",
3-
"version": "0.0.19",
3+
"version": "0.0.20",
44
"description": "A linting tool to validate tldr pages",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)