-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (51 loc) · 1.71 KB
/
publish-charts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Create GitHub release for NuoDB Helm Charts and add to index
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Check version tag and changelog
id: vars
run: |
set -e
git checkout master
git checkout -
VERSION="$(./release/relman.py --check-current --show-head-version)"
if [ -z "$VERSION" ]; then
echo "No version tag found" >&2
exit 1
fi
if [ "refs/tags/v$VERSION" != "$GITHUB_REF" ]; then
echo "Unexpected version tag: \"refs/tags/v$VERSION\" != \"$GITHUB_REF\"" >&2
exit 1
fi
if [ ! -f "changelogs/v${VERSION}.md" ]; then
echo "No changelog found for $VERSION" >&2
exit 1
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Package Helm charts
run: ./scripts/package.sh
- name: Publish GitHub release
run: |
gh release create v${{ steps.vars.outputs.version }} \
-t "NuoDB Helm Charts ${{ steps.vars.outputs.version }}" \
-F changelogs/v${{ steps.vars.outputs.version }}.md \
package/stable/v${{ steps.vars.outputs.version }}/*.tgz \
package/incubator/v${{ steps.vars.outputs.version }}/*.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Helm index
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
./scripts/update-index.sh
env:
PUSH_UPDATE: "true"