-
Notifications
You must be signed in to change notification settings - Fork 76
ci(release-please): Release please single PR #1176
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
Open
d3xter666
wants to merge
20
commits into
main
Choose a base branch
from
feat-rp-single-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
cc47ddc
feat: Enable release-please release setup
d3xter666 c4a8080
refactor: Update placeholders
d3xter666 b0f6de9
feat: Introduce release-please-manifest.json
d3xter666 1d538cf
fix: License
d3xter666 336eec3
refactor: Update release-please workflow
d3xter666 3113d05
fix: Logger License whitespaces
d3xter666 cb44e81
feat: Release please setup
d3xter666 d5c901e
refactor: Update release-please to publish to NPM
d3xter666 e1a17d2
fix: Cleanups
d3xter666 bf4e402
refactor: Cleanup
d3xter666 81e3bc6
fix: Address RP package & shrinkwrap versions update
d3xter666 f5ac61b
fix: Enforce sequential publishing of the packages
d3xter666 d4b8f4c
docs: Provide component names to the description along with the version
d3xter666 3f35fe1
fix: Shrinkwrap proper generation
d3xter666 c182049
feat: Enable trusted publishing to NPM
d3xter666 e6bba15
refactor: Use working-directory prop instead of CD-ing
d3xter666 d67b4a5
refactor: Bump package versions to v5 pre-release
d3xter666 24f2e73
fix: Prerelases don't have ranges
d3xter666 f63a6c1
fix: Correctly update the shrinkwrap
d3xter666 77d044e
fix: Generate correct npm-shrinkwrap.json
d3xter666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| name: Release Please | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| id-token: write # Required for trusted publishing via OIDC (https://docs.npmjs.com/trusted-publishers) | ||
|
|
||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Node.js LTS | ||
| uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 24.x | ||
|
|
||
| - name: Run Release Please to update PRs and create releases | ||
| uses: googleapis/release-please-action@v4 | ||
| id: release | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
|
||
| publish-packages: | ||
| runs-on: ubuntu-24.04 | ||
| needs: release-please | ||
| if: needs.release-please.outputs.releases_created == 'true' | ||
| strategy: | ||
| # Publish packages in dependency order: logger → fs → builder → server → project | ||
| # CLI is handled separately to update shrinkwrap | ||
| # Order of packages in the matrix does matter and is important! | ||
| # release-please updates the package.json dependencies with ones that do not exist yet on NPM | ||
| # Publish in the correct order is important, so that dependencies are available and resolved properly! | ||
| max-parallel: 1 | ||
| matrix: | ||
| package: [logger, fs, builder, server, project] | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Node.js LTS | ||
| uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 24.x | ||
|
|
||
| - name: Install and publish ${{ matrix.package }} | ||
| working-directory: packages/${{ matrix.package }} | ||
| run: | | ||
| echo "🚀 Publishing @ui5/${{ matrix.package }}" | ||
|
|
||
| # TODO: Uncomment when ready to publish | ||
| # npm ci | ||
| # npm publish --access public | ||
d3xter666 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| publish-cli: | ||
| runs-on: ubuntu-24.04 | ||
| needs: [release-please, publish-packages] | ||
| if: needs.release-please.outputs.releases_created == 'true' | ||
| steps: | ||
| - uses: actions/checkout@v5 | ||
|
|
||
| - name: Node.js LTS | ||
| uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 24.x | ||
|
|
||
| - name: Generate npm-shrinkwrap.json (isolated staging) | ||
| run: | | ||
| set -e | ||
| echo "📦 Isolating @ui5/cli for shrinkwrap" | ||
| npm ci --omit=dev | ||
| STAGE=cli-publish | ||
| rm -rf "$STAGE" && mkdir "$STAGE" | ||
| echo "↪️ Copying CLI sources" | ||
| rsync -a --exclude 'node_modules' packages/cli/ "$STAGE"/ | ||
| echo "↪️ Copying resolved production dependencies" | ||
| rsync -a node_modules/ "$STAGE"/node_modules/ | ||
| echo "🧹 Pruning extraneous modules inside staging" | ||
| (cd "$STAGE" && npm prune --production) | ||
| echo "🔒 Running npm shrinkwrap in isolated directory (post-prune)" | ||
| (cd "$STAGE" && npm shrinkwrap) | ||
| mv "$STAGE"/npm-shrinkwrap.json packages/cli/ | ||
| echo "✅ npm-shrinkwrap.json placed into packages/cli" | ||
|
|
||
| - name: Publish @ui5/cli | ||
| working-directory: packages/cli | ||
| run: | | ||
| echo "🚀 Publishing @ui5/cli" | ||
| # TODO: Uncomment when ready to publish | ||
| # npm publish --access public | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "packages/logger": "4.0.2", | ||
d3xter666 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "packages/fs": "4.0.2", | ||
| "packages/builder": "4.0.11", | ||
| "packages/server": "4.0.7", | ||
| "packages/project": "4.0.6", | ||
| "packages/cli": "4.0.26" | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Special handling for the CLI package is required, where the shrinkwrap needs to be updated/created after all dependencies have been released. Should this be done in a separate PR?
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.
Thanks!
I think we had something related to the shrinkwrap itself, but I can't find the discussion/BLI!
I have updated the action so that it:
npm cifor publishing for the next package in the chain, it will have the previous package already published on NPM.As per my research this is the approach many monorepos are wokring. Lerna, for example