Skip to content

Commit

Permalink
chore: fix workflows used to release and publish npm package (#45)
Browse files Browse the repository at this point in the history
Configuration updates:
- Add the missing workspace directive in the "release" workflow. The
version in the root package.json file was previously updated instead of
the versions in the addons workspace.
- "npm publish" workflow: pass cli option instead of using .npmrc file
(not sure it was used, command is now more explicit).
- Explicitly mark the addons workspace as public in package.json. This
ensures that the value is not inherited from the root package.json.

Fix the versions in package.json files that have been incorrectly
updated in v0.1.0:
- Revert version added to the root package.json. This is not the package
that should have been published.
  - Restore the right version in the "addons" workspace.
  • Loading branch information
tbouffard authored Jul 21, 2023
1 parent 71aace4 commit 4b29e55
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: ./.github/actions/build-setup
with:
registry-url: 'https://registry.npmjs.org'
- run: npm publish -w packages/addons
# scoped package requires "access=public"
- run: npm publish -w packages/addons --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
run: git checkout main && git pull --tags
- name: Bump Version
run: |
npm version ${{ github.event.inputs.type }} --no-commit-hooks --message "chore(release): %s"
npm version ${{ github.event.inputs.type }} --no-commit-hooks --message "chore(release): %s" -w packages/addons
- name: Push Version
run: git push && git push --tags
8 changes: 3 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
"private": true,
"workspaces": [
"./packages/*"
],
"version": "0.1.0"
]
}
4 changes: 0 additions & 4 deletions packages/addons/.npmrc

This file was deleted.

3 changes: 2 additions & 1 deletion packages/addons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@process-analytics/bv-experimental-add-ons",
"version": "0.0.1",
"version": "0.1.0",
"private": false,
"description": "Experimental add-ons for bpmn-visualization",
"keywords": [
"analytics",
Expand Down

0 comments on commit 4b29e55

Please sign in to comment.