Skip to content

Commit

Permalink
ci: setup release please CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Nov 6, 2024
1 parent e93549e commit adb1ec7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/_release_please.yaml
Original file line number Diff line number Diff line change
@@ -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) }}"
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit adb1ec7

Please sign in to comment.