Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

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.RELEASE_PLEASE_TOKEN }}

publish-packages:
runs-on: ubuntu-24.04
needs: release-please
if: needs.release-please.outputs.releases_created == 'true'
strategy:
matrix:
package: [logger, fs, builder, server, project, cli]
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 }}
Copy link
Member

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?

Copy link
Member Author

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:

  • Runs the publishing of all the packages in a sequence. This ensures that during npm ci for publishing for the next package in the chain, it will have the previous package already published on NPM.
  • For the CLI, it has a special step where all the packages are available already on NPM and it's been updated accordingly.

As per my research this is the approach many monorepos are wokring. Lerna, for example

run: |
cd packages/${{ matrix.package }}
echo "🚀 Publishing @ui5/${{ matrix.package }}"

# TODO: Uncomment when ready to publish
# npm ci
# npm publish --access public
8 changes: 8 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"packages/logger": "4.0.2",
"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"
}
84 changes: 84 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
"packages/logger": {
"component": "logger"
},
"packages/fs": {
"component": "fs"
},
"packages/builder": {
"component": "builder"
},
"packages/server": {
"component": "server"
},
"packages/project": {
"component": "project"
},
"packages/cli": {
"component": "cli"
}
},
"release-type": "node",
"always-update": true,
"pull-request-header": ":tractor: New release prepared",
"pull-request-title-pattern": "release: UI5 CLI packages",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": true
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Automation",
"hidden": true
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
},
{
"type": "release",
"section": "Release",
"hidden": true
}
]
}