-
Notifications
You must be signed in to change notification settings - Fork 0
Publish a developer package to the GitHub npm registry with GitHub Actions #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Introduces a GitHub Actions workflow `publish-dev-package` which publishes a developer package to the GitHub npm registry when commits are pushed to the `main` branch. A developer package bears the target release version but followed by the short commit hash of the commit used to build the package. The actual operations are done in `publish-package.yml`. The workflow is also triggered by the `issue/2-gha-publish-dev` branch for experiments. But this trigger must be removed when experiments are completed.
`short_commit_hash` → `short-commit-hash`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a GitHub Actions workflow to automate building and publishing a developer package tagged with the commit hash, and updates the package manifest and documentation to support installation from GitHub’s npm registry.
- Introduces a reusable
publish-package.ymlworkflow and apublish-dev-package.ymlthat triggers on pushes tomain - Updates
package.jsonto include the Japanese README in the published files - Extends
README.mdandREADME.ja.mdwith instructions for installing developer packages from GitHub Packages
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added README.ja.md to the files array for npm publication |
| README.md | Documented how to install developer packages via GitHub Packages |
| README.ja.md | Japanese translation of installation instructions |
| .github/workflows/publish-package.yml | New reusable workflow to build and publish to any npm registry |
| .github/workflows/publish-dev-package.yml | Workflow to publish developer packages on main |
Comments suppressed due to low confidence (1)
.github/workflows/publish-dev-package.yml:7
- This test branch filter (
issue/2-gha-publish-dev) should be removed before merging to avoid unintended workflow runs.
- - issue/2-gha-publish-dev # TODO: remove after testing
Fixes an awkward Japanese term. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces GitHub Actions workflows that build and publish a developer package to the GitHub npm registry when commits are pushed to the main branch. Key changes include updating the package.json file, adding documentation in both English and Japanese on how to install the developer package, and adding two new workflow files to automate the publishing process.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated the files array to include README.ja.md |
| README.md | Added instructions for installing developer packages via GitHub |
| README.ja.md | Added Japanese documentation explaining GitHub Packages installation |
| .github/workflows/publish-package.yml | Introduced a reusable workflow for publishing to a specified npm registry |
| .github/workflows/publish-dev-package.yml | Configured workflow to publish developer packages on push to main |
kikuomax
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I self-reviewed the changes.
Proposed changes
Introduces a GitHub Actions workflow which builds and publishes a developer package to the GitHub npm registry when commits are pushed to the
mainbranch.A developer package bears the next release version but followed by a dash (
-) plus the short commit hash of the commit used to build the package.Related issues: