Skip to content

Commit e8ef360

Browse files
committed
Rewrite release flow
1 parent 238c19e commit e8ef360

File tree

1 file changed

+19
-30
lines changed

1 file changed

+19
-30
lines changed

.github/workflows/release.yaml

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,35 @@ on:
99
jobs:
1010
release:
1111
runs-on: ubuntu-latest
12+
1213
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
1516
with:
16-
fetch-depth: 0
17-
18-
- name: Configure Git
19-
run: |
20-
git config user.name "$GITHUB_ACTOR"
21-
git config user.email "[email protected]"
17+
fetch-depth: 0 # required for full tag history
2218

23-
- name: Install Helm
24-
uses: azure/setup-helm@v1
19+
- name: Set up Helm
20+
uses: azure/setup-helm@v3
2521
with:
26-
version: v3.5.4
22+
version: v3.12.3
2723

28-
- name: Add chart repo dependencies
29-
# Note: this repos should match with the repos set in ct.yaml
30-
# See https://github.com/Flagsmith/flagsmith-charts/issues/105
24+
- name: Build chart
3125
run: |
32-
helm repo add stable https://charts.helm.sh/stable
33-
helm repo add influxdb2 https://helm.influxdata.com/
34-
helm repo add kiwigrid https://kiwigrid.github.io
35-
helm repo add bitnami https://charts.bitnami.com/bitnami
26+
mkdir -p .cr-release-packages
27+
helm dependency update charts/flagsmith
28+
helm package charts/flagsmith --destination .cr-release-packages
3629
37-
- name: Set up chart-testing
38-
uses: helm/[email protected]
30+
- name: Upload chart to GitHub Release
31+
uses: softprops/action-gh-release@v1
3932
with:
40-
version: v3.3.0
41-
42-
- name: Run chart-testing (lint)
43-
run: ct lint --config ct.yaml --lint-conf lintconf.yaml
33+
files: .cr-release-packages/*.tgz
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4436

45-
- name: Run chart-releaser
46-
id: chart-releaser
37+
- name: Update GitHub Pages index
4738
uses: helm/chart-releaser-action@v1
4839
with:
49-
# Since release please will create the release, we are just using chart-releaser
50-
# to upload the charts. By default, it will skip upload if it finds an existing
51-
# release / tag.
40+
charts_dir: charts
5241
skip_existing: false
5342
env:
54-
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
43+
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)