Commit b79be33
Add GitHub Actions for publishing packages to NPM registry (#692)
* chore: add GitHub workflows for automated npm publishing
- Add publish-radfish.yml workflow for @nmfs-radfish/radfish package
- Add publish-react-radfish.yml workflow for @nmfs-radfish/react-radfish package
- Include admin permission checks, version bumping, testing, and publishing steps
- Add rollback mechanisms for failed publishes
* refactor: migrate radfish package from Jest to Vitest
- Remove babel.config.js and jest.config.js
- Update package.json to use vitest instead of jest
- Replace jest imports with vitest imports in all test files
- Remove Jest-related dependencies and add vitest dependencies
- Clean up unnecessary dependencies from radfish package
* chore: update react-radfish package configuration
- Add publishConfig for npm registry publishing
- Add React as peer dependency
- Configure package for public access
* chore: update git tag format to use shorter package names
- Change tag format from @nmfs-radfish/[package]@[version] to [package]@[version]
- Update both radfish and react-radfish workflows
- Cleaner tag names since repository is already nmfs-radfish namespaced
* feat: add latest tags for packages in publishing workflows
- Add [package-name]@latest tags that get updated with each new version
- Force push latest tags to always point to the most recent release
- Provides a stable reference for the current version of each package
* fix: implement proper tag logic for prerelease vs stable releases
- For prereleases: only create/update beta tag
- For stable releases: only create/update latest tag
- Prevents latest tag from being updated by prereleases
- Allows beta tag to become stale between prerelease cycles
* chore: add npm tag support for prerelease vs stable releases
- For prereleases: npm publish --tag beta
- For stable releases: npm publish (defaults to latest tag)
- Ensures npm registry tags match git tag behavior
* chore: Register workflows on GitHub
* chore: Remove push trigger
* fix: checkout current branch instead of hardcoded main
- Update workflows to use github.ref instead of hardcoded main branch
- Change step name from 'Checkout main branch' to 'Checkout repository'
- Ensures workflows run against the current branch's code and dependencies
- Fixes Jest vs Vitest test runner issue when running from feature branches
* fix: use broader peer dependency range for radfish
- Change from ^1.0.0 to >=1.0.0 <2.0.0 for @nmfs-radfish/radfish
- Allows independent versioning of packages within major version
- Prevents npm version bump conflicts in monorepo workspace
- Commits to semantic versioning within v1.x.x releases
* chore: update package-lock.json for new peer dependency range
- Regenerate lockfile to reflect peer dependency change from ^1.0.0 to >=1.0.0 <2.0.0
- Should resolve npm version bump conflicts in workspace
* fix: update peer dependency to support prereleases
- Change from >=1.0.0 <2.0.0 to ^1.0.0-0 for @nmfs-radfish/radfish
- ^1.0.0-0 allows prereleases like 1.1.2-rc.1 while maintaining semver compatibility
- Should resolve npm version bump issues with prerelease versions
* chore: add --legacy-peer-deps flag to version bump steps
- Add --legacy-peer-deps to npm version commands in both workflows
- Resolves peer dependency conflicts when bumping prerelease versions
- Allows using standard ^1.0.0 peer dependency format
* refactor: simplify workflow inputs and logic for version bumping
- Replace separate version + prerelease inputs with single version_type dropdown
- Remove complex conditional logic for determining version bump type
- Auto-detect prerelease status from resulting version for npm publish tags
- Remove redundant 'Navigate to package directory' steps
- Eliminate ambiguity: users now explicitly choose exact version bump behavior
Examples:
- prerelease: 1.1.2-rc.1 → 1.1.2-rc.2
- preminor: 1.1.2-rc.1 → 1.2.0-rc.1
- minor: 1.1.2 → 1.2.0
* fix: use jq to parse version from package.json instead of npm output
- npm version command outputs multiline content that breaks GitHub Actions
- Now run npm version to update package.json, then use jq to get clean version
- Eliminates multiline output issues and removes 'v' prefix automatically
- Results in clean version strings like '1.1.2-rc.3' instead of 'v1.1.2-rc.3\n...'
- Fixes 'Unable to process file command output successfully' error
* fix: push to current branch instead of hardcoded main
- Workflows were failing when run on feature branches because they tried to push to 'main'
- Changed 'git push origin main' to 'git push origin HEAD' to push current branch
- Now workflows work correctly on any branch, including feature branches for testing
* chore: reset radfish version to last published version (1.1.2-rc.0)
- Ready to run workflow with prerelease version type
- npm version prerelease will increment to 1.1.2-rc.1
* fix: add --legacy-peer-deps to install step in workflows
- Resolves peer dependency conflicts during npm install
- react-radfish has peer dependency ^1.0.0 but workspace has 1.1.1
- --legacy-peer-deps allows npm to proceed with installation
* chore(release): bump @nmfs-radfish/radfish to 1.1.3-rc.0
* chore(release): bump @nmfs-radfish/radfish to 1.1.4-rc.0
* fix: add --legacy-peer-deps to test workflow scripts
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 557abb5 commit b79be33
File tree
11 files changed
+1607
-279
lines changed- .github/workflows
- packages
- radfish
- storage
- react-radfish
11 files changed
+1607
-279
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
0 commit comments