From cbdc978fe15a052cdc011072e164cb08647878bc Mon Sep 17 00:00:00 2001 From: Jakob Steiner Date: Wed, 4 Sep 2024 12:22:46 +0200 Subject: [PATCH] ci: add initial release-please config Signed-off-by: Jakob Steiner --- .github/workflows/release.yaml | 44 ++++++++++++++++++++++++++++++++++ .release-please-manifest.json | 3 +++ release-please-config.json | 27 +++++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 .github/workflows/release.yaml create mode 100644 .release-please-manifest.json create mode 100644 release-please-config.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..d4699ee9e3 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,44 @@ +name: Update release PR and create release + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + release-please: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + outputs: + releases_created: ${{ steps.release-please.outputs.releases_created }} + tag_name: ${{ steps.release-please.outputs.tag_name }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Release Please + id: release-please + uses: googleapis/release-please-action@v4 + + publish-manifest: + needs: + - release-please + if: ${{ needs.release-please.outputs.releases_created == 'true' + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up kubectl + uses: azure/setup-kubectl@v4 + with: + version: "v1.29.1" + - name: Build Manifest + run: kubectl kustomize glasskube/trieve > glasskube/manifest.yaml + - name: Upload Release Artifact + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ needs.release-please.outputs.tag_name }} glasskube/manifest.yaml diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000000..2cfadde6a8 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.11.7" +} diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000000..e9811f6818 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,27 @@ +{ + "bootstrap-sha": "c04a5c4691997e54ec54030cea1dae8ab4486c10", + "release-type": "simple", + "prerelease": false, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "draft": false, + "extra-files": [], + "packages": { + ".": {} + }, + "changelog-sections": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "chore", "section": "Other" }, + { "type": "docs", "section": "Docs" }, + { "type": "perf", "section": "Performance" }, + { "type": "build", "hidden": true, "section": "Build" }, + { "type": "deps", "section": "Dependency Updates" }, + { "type": "ci", "hidden": true, "section": "CI" }, + { "type": "refactor", "section": "Refactoring" }, + { "type": "revert", "hidden": true, "section": "Reverts" }, + { "type": "style", "hidden": true, "section": "Styling" }, + { "type": "test", "hidden": true, "section": "Tests" } + ], + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" +}