Skip to content

ci: add release workflow#140

Open
lollipop-onl wants to merge 6 commits intonulab:masterfrom
lollipop-onl:ci/add-release-workflow
Open

ci: add release workflow#140
lollipop-onl wants to merge 6 commits intonulab:masterfrom
lollipop-onl:ci/add-release-workflow

Conversation

@lollipop-onl
Copy link
Copy Markdown
Contributor

@lollipop-onl lollipop-onl commented Mar 21, 2026

Summary

  • Added a workflow_dispatch based release workflow that allows selecting the version (patch/minor/major) when triggering the workflow.
  • Supported npm Trusted Publishing (OIDC) and Provenance.
  • Enabled dry-run by default to allow for pre-release checks.
  • Added a safeguard to call the existing CI workflow as a Reusable Workflow, ensuring only resources that pass CI are published.
  • Delete the dist/ directory from the repository, as it is generated during release.

The content is generally equivalent to the release workflow of nulab/bee.

Workflow Process

  1. ci: Run nodejs.yml (CI)
  2. build: Bump version from the latest tag and execute build
  3. publish: Publish to npm, push tags, and create GitHub Release

Required Setup

1. npm: Trusted Publishing Configuration

From the backlog-js package settings screen, allow OIDC publishing via GitHub Actions.

  1. Open the package settings screen
  2. Configure Trusted Publisher as follows:
    • Publisher: GitHub Actions
    • Organization or user: nulab
    • Repository: backlog-js
    • Workflow filename: release.yml
    • Environment name: production
  3. Save the changes

https://docs.npmjs.com/trusted-publishers#configuring-trusted-publishing

2. GitHub: Creating the production environment

  1. Open the repository's Environment settings page
  2. Create production from New environment
  3. (Recommended) Specify a user (maintainer) in Required reviewers
    • This allows you to require approval from that user before executing the publish step of the release workflow.

https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments

lollipop-onl and others added 2 commits March 22, 2026 02:11
Set up a workflow_dispatch-based release workflow that supports
npm trusted publishing (OIDC) and provenance. Version is selected
at trigger time (patch/minor/major) with a dry-run checkbox for
safe pre-flight checks. Also add workflow_call trigger to CI
workflow so it can be reused from the release workflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build artifacts are now produced by the release workflow,
so there is no need to track them in git.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@mmktomato mmktomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lollipop-onl
I added some comment. Sorry, I didn't notice this PR is still a draft 🙇 🙇

  • I guess dry-run is no longer necessary if the release is done by Actions. What do you think?
  • Can you change DEVELOPMENT.md ?
  • Can you add a step to modify CHANGELOG.md ? (Or the file might be no longer necessary as the release notes will be written in the GitHub Release. 🤔 )

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
@lollipop-onl lollipop-onl marked this pull request as ready for review March 23, 2026 03:26
--no-git-checks is a yarn-specific flag and not supported by npm.
npm does not perform git state checks during publish by default,
so this flag is unnecessary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lollipop-onl lollipop-onl requested a review from mmktomato March 23, 2026 03:33
Resolve conflicts: keep dist/ in .gitignore and exclude new dist files
from version control, consistent with this branch's approach.
lollipop-onl and others added 2 commits March 24, 2026 19:50
Add package-lock.json to build artifact and push version changes back
to the default branch after publishing, so the repository always
reflects the latest released version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rkflow

# Conflicts:
#	.github/workflows/nodejs.yml
#	dist/backlog.iife.js
#	dist/backlog.iife.min.js
#	dist/backlog.js
#	dist/backlog.min.js
#	dist/index.cjs
#	dist/index.d.cts
#	dist/index.d.mts
#	dist/index.mjs
@mmktomato
Copy link
Copy Markdown
Member

@lollipop-onl
I've confirmed versions will be pushed backed to the default branch, thank you 👍
Can you check my other comments?
#140 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants