Skip to content

Commit 1f18853

Browse files
committed
add Helm chart release to GitHub Actions workflow
Signed-off-by: zeroalphat <taichi-takemura@cybozu.co.jp>
1 parent a81feb3 commit 1f18853

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/release.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,31 @@ jobs:
6060
gh release create $VERSION $PRERELEASE_FLAG \
6161
-t "Release $VERSION" \
6262
--generate-notes
63+
chart-release:
64+
permissions:
65+
contents: write
66+
runs-on: "ubuntu-24.04"
67+
needs: release
68+
if: contains(needs.release.result, 'success')
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v4
72+
with:
73+
fetch-depth: 0
74+
- name: Create release notes
75+
run: |
76+
tag_version=${GITHUB_REF##*/}
77+
cat <<EOF > ./charts/ofen/RELEASE.md
78+
Helm chart for ofen [$tag_version](https://github.com/cybozu-go/ofen/releases/tag/$tag_version)
79+
80+
EOF
81+
- name: Configure Git
82+
run: |
83+
git config user.name "$GITHUB_ACTOR"
84+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
85+
- name: Run chart-releaser
86+
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
87+
with:
88+
config: "cr.yaml"
89+
env:
90+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

cr.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
owner: cybozu-go
2+
git-repo: ofen
3+
release-name-template: "{{ .Name }}-chart-{{ .Version }}"
4+
release-notes-file: RELEASE.md

0 commit comments

Comments
 (0)