From adb1ec716d0d88f0a9be6b9656f189fd0f838efb Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Tue, 29 Oct 2024 13:24:34 +0000 Subject: [PATCH] ci: setup release please CI workflow --- .github/workflows/_release_please.yaml | 36 ++++++++++++++++++++++++++ .github/workflows/ci.yaml | 7 +++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/_release_please.yaml diff --git a/.github/workflows/_release_please.yaml b/.github/workflows/_release_please.yaml new file mode 100644 index 0000000..afecf58 --- /dev/null +++ b/.github/workflows/_release_please.yaml @@ -0,0 +1,36 @@ +name: Release Please + +on: + workflow_call: + outputs: + apps-chart-released: + value: ${{ jobs.release_please.apps-chart-released }} + graph-chart-released: + value: ${{ jobs.release_please.graph-chart-released }} + monitoring-chart-released: + value: ${{ jobs.release_please.monitoring-chart-released }} + supergraph-chart-released: + value: ${{ jobs.release_please.supergraph-chart-released }} + +jobs: + release_please: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + apps-chart-released: ${{ contains(steps.release.outputs.paths_released, 'charts/apps') }} + graph-chart-released: ${{ contains(steps.release.outputs.paths_released, 'charts/graph') }} + monitoring-chart-released: ${{ contains(steps.release.outputs.paths_released, 'charts/monitoring') }} + supergraph-chart-released: ${{ contains(steps.release.outputs.paths_released, 'charts/supergraph') }} + steps: + - name: Release Please + id: release + uses: googleapis/release-please-action@v4.1.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + config-file: release-please-config.json + manifest-file: .release-please-manifest.json + + - name: Release Please Outputs + run: echo "${{ toJson(steps.release.outputs) }}" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b512eb1..707a924 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,6 +9,13 @@ jobs: # Deduplicate jobs from pull requests and branch pushes within the same repo. if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository uses: ./.github/workflows/_lint_commits.yaml + + release_please: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: ./.github/workflows/_release_please.yaml + permissions: + contents: write + pull-requests: write helm_lint: # Deduplicate jobs from pull requests and branch pushes within the same repo.