Skip to content
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

ci(release-please): Add release-please setup #7

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
45 changes: 45 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
pull-request:
runs-on: ubuntu-22.04
outputs:
releases_created: ${{steps.release.outputs.releases_created}}
paths_released: ${{steps.release.outputs.paths_released}}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
token: ${{secrets.GH_OPENUI5BOT}}
publish-package:
needs: pull-request
if: ${{needs.pull-request.outputs.releases_created && toJson(fromJson(needs.pull-request.outputs.paths_released)) != '[]'}}
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 21.x
uses: actions/setup-node@v4
with:
node-version: 21.x
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Publish to NPM
env:
NPM_TOKEN: ${{secrets.NPM_UI5BOT}}
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ./.npmrc
npm publish --provenance --access public
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.1"
}
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@
},
"files": [
"CHANGELOG.md",
"CONTRIBUTING.md",
"bin/**",
flovogt marked this conversation as resolved.
Show resolved Hide resolved
"lib/**",
"LICENSES/**",
".reuse/**",
"resources/**"
"lib/**",
"npm-shrinkwrap.json",
"resources/**",
".reuse/**"
],
"engines": {
"node": "^18.14.2 || ^20.11.0 || >=21.2.0",
Expand Down
69 changes: 69 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"packages": {
".": {
"pull-request-header": ":tractor: New release prepared",
"pull-request-title-pattern": "release: v${version}",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"prerelease": true,
"release-as": "0.1.0",
"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
}
]
}
}
}