You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add CI/CD release workflow with npm trusted publishers
- Recreate release.yml workflow with OIDC support
- Add id-token: write permission for trusted publishing
- Update README with trusted publisher setup instructions
- Remove need for NPM_TOKEN secret
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,30 @@ The PR preview is deployed to the `gh-pages` branch in a directory structure lik
131
131
132
132
## Publishing
133
133
134
-
Releases are published manually from the command line. This ensures full control over the release process and avoids CI/CD token management issues.
134
+
Releases can be published either automatically via CI/CD (using npm trusted publishers) or manually from the command line.
135
+
136
+
### Automatic Publishing (CI/CD)
137
+
138
+
When you merge changes to `main` with version updates, the GitHub Actions workflow will automatically publish to npm using [npm trusted publishers](https://docs.npmjs.com/trusted-publishers). This uses OIDC authentication and doesn't require npm tokens.
139
+
140
+
**Setup required:** Configure trusted publishers on npmjs.com for the `@lambdacurry/forms` package (see setup instructions below).
141
+
142
+
#### Setting Up Trusted Publishers
143
+
144
+
1. Go to your package on npmjs.com: https://www.npmjs.com/package/@lambdacurry/forms
145
+
2. Navigate to **Settings** → **Trusted Publisher** section
146
+
3. Click **"Select your publisher"** → **GitHub Actions**
147
+
4. Configure the following:
148
+
-**Organization or user**: `lambda-curry` (or your GitHub username)
149
+
-**Repository**: `forms`
150
+
-**Workflow filename**: `release.yml` (must match exactly, including `.yml` extension)
151
+
5. Click **Save**
152
+
153
+
The workflow file must exist at `.github/workflows/release.yml` in your repository. Once configured, publishes from the `main` branch will use OIDC authentication automatically.
154
+
155
+
### Manual Publishing
156
+
157
+
You can also publish manually from the command line when needed.
0 commit comments