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
### 2. Link package to GitHub repo (OIDC provenance)
23
23
24
-
Generate an automation token for CI/CD:
24
+
Publishing uses GitHub Actions OIDC — no npm tokens or secrets needed. For this to work, the package must be linked to the GitHub repo on npmjs.com:
25
25
26
-
1. Log in to https://www.npmjs.com
27
-
2. Go to Access Tokens → Generate New Token
28
-
3. Select **"Automation"** type (bypasses 2FA for CI)
29
-
4. Copy the token (starts with `npm_...`)
26
+
1. Go to https://www.npmjs.com/package/@policyengine/design-system/access
27
+
2. Under "Publishing access", link to the `PolicyEngine/policyengine-app-v2` GitHub repository
30
28
31
-
### 3. GitHub Secret
32
-
33
-
Add the npm token as a repository secret:
34
-
35
-
1. Go to repo Settings → Secrets and variables → Actions
36
-
2. Click "New repository secret"
37
-
3. Name: `NPM_TOKEN`
38
-
4. Value: paste the npm token
39
-
5. Click "Add secret"
29
+
This allows GitHub Actions to authenticate with npm using a short-lived OIDC token, and published versions get a verified provenance badge.
40
30
41
31
## Publishing
42
32
43
33
### Automatic (Recommended)
44
34
45
-
The package is automatically published when you create a GitHub Release:
46
-
47
-
1. Update version in `packages/design-system/package.json`
48
-
2. Commit and push to main
49
-
3. Create a new Release on GitHub
50
-
4. The `publish-design-system.yaml` workflow triggers automatically
35
+
Publishing is handled automatically by [semantic-release](https://github.com/semantic-release/semantic-release) via the `publish-design-system.yaml` workflow. It triggers on:
51
36
52
-
### Manual
37
+
- Push to `main` with changes in `packages/design-system/**`
38
+
- Manual `workflow_dispatch`
53
39
54
-
Trigger the workflow manually:
40
+
Version bumps are determined from **conventional commit messages** — no manual version changes needed:
55
41
56
-
1. Go to Actions → "Publish Design System"
57
-
2. Click "Run workflow"
58
-
3. Optionally enable "Dry run" to test without publishing
42
+
-`fix: ...` → patch (0.1.0 → 0.1.1)
43
+
-`feat: ...` → minor (0.1.0 → 0.2.0)
44
+
-`feat!: ...` or `BREAKING CHANGE:` → major (0.1.0 → 1.0.0)
59
45
60
-
### Local (Development)
46
+
### Manual (Development)
61
47
62
48
```bash
63
49
# Login to npm (one-time)
@@ -70,23 +56,6 @@ npm run build --workspace=@policyengine/design-system
70
56
npm publish --workspace=@policyengine/design-system --access public
0 commit comments