From ed4f31a16529104e54b8853bb0fb33471f6b3c2b Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Thu, 18 Jan 2024 02:10:32 +0900 Subject: [PATCH] ci: add release-please workflow Signed-off-by: Mogyuchi --- .../.release-please-manifest.json | 3 + .../release-please/release-please-config.json | 78 +++++++++++++++++++ .github/workflows/release-please.yml | 24 ++++++ 3 files changed, 105 insertions(+) create mode 100644 .github/files/release-please/.release-please-manifest.json create mode 100644 .github/files/release-please/release-please-config.json create mode 100644 .github/workflows/release-please.yml diff --git a/.github/files/release-please/.release-please-manifest.json b/.github/files/release-please/.release-please-manifest.json new file mode 100644 index 0000000..466df71 --- /dev/null +++ b/.github/files/release-please/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.1.0" +} diff --git a/.github/files/release-please/release-please-config.json b/.github/files/release-please/release-please-config.json new file mode 100644 index 0000000..c4a9335 --- /dev/null +++ b/.github/files/release-please/release-please-config.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "changelog-sections": [ + { + "type": "feat", + "section": "Features", + "hidden": false + }, + { + "type": "fix", + "section": "Bug Fixes", + "hidden": false + }, + { + "type": "perf", + "section": "Performance Improvements", + "hidden": false + }, + { + "type": "deps", + "section": "Dependencies", + "hidden": false + }, + { + "type": "revert", + "section": "Reverts", + "hidden": false + }, + { + "type": "docs", + "section": "Documentation", + "hidden": true + }, + { + "type": "style", + "section": "Styles", + "hidden": true + }, + { + "type": "chore", + "section": "Miscellaneous Chores", + "hidden": true + }, + { + "type": "refactor", + "section": "Code Refactoring", + "hidden": true + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System", + "hidden": true + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "packages": { + ".": { + "changelog-path": "CHANGELOG.md", + "release-type": "node", + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "prerelease": false, + "include-component-in-tag": false, + "pull-request-title-pattern": "release: v${version}" + } + }, + "release-label": "autorelease: published" +} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..1e8fc9f --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,24 @@ +on: + push: + branches: main + +name: release-please + +jobs: + release-please: + if: github.repository_owner == '4m-mazi' + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release-please.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@cc61a07e2da466bebbc19b3a7dd01d6aecb20d1e # v4.0.2 + id: release-please + with: + config-file: .github/files/release-please/release-please-config.json + manifest-file: .github/files/release-please/.release-please-manifest.json + skip-github-pull-request: + ${{ startsWith(github.event.head_commit.message, 'release:') && + github.event.head_commit.author.name == 'github-actions[bot]' }}