Skip to content

Conversation

@talissoncosta
Copy link
Contributor

@talissoncosta talissoncosta commented Dec 25, 2025

Summary

Adds NPM publishing infrastructure for @flagsmith/backstage-plugin.

Changes

  • Package configuration: Update package.json with NPM metadata, scoped package name, and Backstage plugin config
  • Publishing workflows with multiple triggers:
    • PR previews (publish-preview.yml): Publishes @next tag with version like 0.1.0-pr.7.ffc27ed
    • GitHub Release (publish-release.yml): Publishes when creating a release via GitHub UI
    • Manual dispatch (publish-release.yml): Allows triggering patch/minor/major releases
  • Documentation: Add LICENSE (Apache-2.0) and CHANGELOG
  • CI/CD: NPM version badge in README, PR comment script for preview versions

Authentication

Uses NPM_TOKEN secret with 2FA bypass for CI publishing. The workflow also uses --provenance for signed attestations (supply chain security).

Setup Required

  1. NPM_TOKEN secret added to GitHub repository
  2. ✅ Token created with 2FA bypass enabled for CI publishing

Test Plan

  • PR preview publishes to @next tag
  • Package installs correctly: yarn add @flagsmith/backstage-plugin@next
  • Production release via manual workflow dispatch

Closes #11

github-actions bot added a commit that referenced this pull request Dec 25, 2025
github-actions bot added a commit that referenced this pull request Jan 26, 2026
@talissoncosta talissoncosta force-pushed the feat/npm-publish branch 2 times, most recently from 6508386 to a55a280 Compare January 27, 2026 19:22
@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2026

📦 NPM Preview Release

A preview version has been published to NPM:

yarn add @flagsmith/[email protected]
# or
yarn add @flagsmith/backstage-plugin@next

This preview will be updated with each new commit to this PR.

talissoncosta and others added 2 commits January 29, 2026 13:33
- Update package.json with NPM metadata (@flagsmith/backstage-plugin)
- Add release workflow with PR previews (@next tag), GitHub Release trigger, and manual dispatch
- Add NPM version badge to README
- Extract PR comment script to scripts/comment-pr-preview.js

Closes #6423

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add Apache-2.0 LICENSE file
- Add CHANGELOG.md with initial 0.1.0 release notes

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Flagsmith Flagsmith deleted a comment from github-actions bot Jan 29, 2026
Rename workflow files for better clarity and extract preview publishing
into its own workflow.

- Rename release.yml → publish-release.yml
- Extract preview job into publish-preview.yml
- Remove pull_request trigger from publish-release.yml
- Update workflow display names to match

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@talissoncosta talissoncosta requested a review from Zaimwa9 January 30, 2026 12:01
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.

Publish @flagsmith/backstage-plugin to NPM

2 participants