Skip to content

Commit d6d3a8f

Browse files
authored
chore: update release workflow and package configurations for npm publishing (#542)
# Improve Release Process and Package Configuration This PR enhances our release workflow and package configuration: - Updated the fixed packages list in `.changeset/config.json` to explicitly list all packages that should be versioned together - Removed `@pgflow/demo` and `@pgflow/website` from the ignore list in changesets configuration - Added registry URL configuration to the setup action - Improved the release workflow by: - Adding path ignores to prevent unnecessary releases when only docs or examples change - Adding manual trigger capability with `workflow_dispatch` - Removing the NPM_TOKEN environment variable (likely using GitHub's built-in token) - Added the `--provenance` flag to npm publish commands for better security - Excluded `example-flows` from the build and publish process - Marked the `@pgflow/example-flows` package as private to prevent accidental publishing These changes will make our release process more reliable and secure.
1 parent 3e76f7e commit d6d3a8f

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

.changeset/config.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
33
"changelog": "@changesets/cli/changelog",
44
"commit": false,
5-
"fixed": [["@pgflow/*", "pgflow"]],
5+
"fixed": [
6+
[
7+
"@pgflow/core",
8+
"@pgflow/dsl",
9+
"@pgflow/client",
10+
"@pgflow/edge-worker",
11+
"pgflow"
12+
]
13+
],
614
"linked": [],
715
"access": "public",
816
"baseBranch": "main",
917
"updateInternalDependencies": "patch",
10-
"ignore": ["@pgflow/demo", "@pgflow/website"]
18+
"ignore": []
1119
}

.github/actions/setup/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ runs:
3636
cache: 'pnpm'
3737
cache-dependency-path: |
3838
**/pnpm-lock.yaml
39+
registry-url: 'https://registry.npmjs.org'
3940

4041
- name: Install dependencies
4142
shell: bash

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
branches:
66
- main
7+
paths-ignore:
8+
- 'pkgs/website/**'
9+
- 'pkgs/example-flows/**'
10+
- 'apps/demo/**'
11+
- '**/*.md'
12+
workflow_dispatch:
713

814
concurrency: ${{ github.workflow }}-${{ github.ref }}
915

@@ -35,4 +41,3 @@ jobs:
3541
publish: pnpm run release
3642
env:
3743
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
38-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"scripts": {
77
"build": "nx run-many --target=build --all",
88
"version": "pnpm changeset version && ./scripts/update-jsr-json-version.sh",
9-
"validate:publish:npm": "pnpm nx run-many -t build --exclude=demo,website && pnpm publish --dry-run --recursive --filter=!./pkgs/edge-worker",
9+
"validate:publish:npm": "pnpm nx run-many -t build --exclude=demo,website,example-flows && pnpm publish --dry-run --provenance --recursive --filter=!./pkgs/edge-worker",
1010
"validate:publish:jsr": "cd ./pkgs/edge-worker && jsr publish --dry-run --allow-slow-types",
1111
"validate:publish": "pnpm run validate:publish:npm && pnpm run validate:publish:jsr",
12-
"publish:npm": "pnpm nx run-many -t build --exclude=demo,website && pnpm publish --recursive --filter=!./pkgs/edge-worker",
12+
"publish:npm": "pnpm nx run-many -t build --exclude=demo,website,example-flows && pnpm publish --provenance --recursive --filter=!./pkgs/edge-worker",
1313
"publish:jsr": "cd ./pkgs/edge-worker && jsr publish --allow-slow-types",
1414
"changeset:tag": "pnpm changeset tag && git push --follow-tags",
1515
"release": "git status && pnpm run validate:publish && pnpm run publish:npm && pnpm run publish:jsr && pnpm run changeset:tag"

pkgs/example-flows/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@pgflow/example-flows",
33
"version": "0.10.0",
4+
"private": true,
45
"license": "Apache-2.0",
56
"dependencies": {
67
"@pgflow/core": "workspace:*",

0 commit comments

Comments
 (0)