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

Setup release-please #65

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
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
6 changes: 6 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"charts/apps": "0.2.2",
"charts/graph": "0.11.1",
"charts/monitoring": "0.2.0",
"charts/supergraph": "1.0.0"
}
33 changes: 33 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"include-component-in-tag": true,
"include-v-in-tag": true,
"tag-separator": "@",
"separate-pull-requests": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"packages": {
"charts/apps": {
"release-type": "helm"
},
"charts/graph": {
"release-type": "helm"
},
"charts/monitoring": {
"release-type": "helm"
},
"charts/supergraph": {
"release-type": "helm",
"additional-paths": [
"supergraph-config.yaml",
"schema/"
]
},
"workflows/compose": {
"release-type": "go"
},
"workflows/update": {
"release-type": "go"
}
}
}