Skip to content

Commit 8694346

Browse files
committed
chore: add chart release workflow
1 parent 1d81ad8 commit 8694346

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Configure Git
20+
run: |
21+
git config user.name "$GITHUB_ACTOR"
22+
git config user.email "[email protected]"
23+
24+
- name: Install chart-releaser
25+
uses: helm/[email protected]
26+
with:
27+
install_only: true
28+
29+
- name: Run chart-releaser
30+
env:
31+
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
32+
run: |
33+
owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
34+
repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
35+
cr package
36+
cr upload --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --skip-existing --generate-release-notes --commit main
37+
cr index --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --index-path="."

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.cr-release-packages

0 commit comments

Comments
 (0)