Skip to content
Merged
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
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: release

on:
push:
branches: [main]

permissions:
contents: write
packages: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v5
id: release
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

helm-push:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.release-please.outputs.tag_name }}

- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.18.4

- name: Login to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Helm package + push to GHCR OCI
run: |
set -euo pipefail
tag="${{ needs.release-please.outputs.tag_name }}"
version="${tag#v}"
# release-please updated Chart.yaml's `version` to match the tag;
# double-check before packaging so we do not push a mismatched chart.
chart_version=$(grep -E '^version: ' Chart.yaml | awk '{print $2}')
if [ "$chart_version" != "$version" ]; then
echo "::error::Chart.yaml version ($chart_version) does not match tag ($version)"
exit 1
fi
helm package .
helm push "platform-vcluster-template-${version}.tgz" oci://ghcr.io/groundsgg/charts
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"0.0.0"}
11 changes: 11 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"release-type": "helm",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"packages": {
".": {
"package-name": "platform-vcluster-template"
}
}
}
Loading