-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 2.17 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Create Release
on:
push:
branches:
- main
jobs:
semantic-release:
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.semantic.outputs.new_release_version }}
new-release-published: ${{ steps.semantic.outputs.new_release_published }}
steps:
- uses: actions/checkout@v2
- uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
helm:
runs-on: ubuntu-latest
needs: semantic-release
steps:
- uses: actions/checkout@v3
- name: Download yq
run: |
wget -nv -nc -O yq https://github.com/mikefarah/yq/releases/download/v4.20.2/yq_linux_amd64
chmod +x yq
- name: Set version
run: |
if ${{ needs.semantic-release.outputs.new-release-published }}; then
echo "RELEASE_VERSION=${{ needs.semantic-release.outputs.release-version }}" >> $GITHUB_ENV
else
git fetch --prune --unshallow
export VERSION=$(git describe --abbrev=0 --tags | sed -e 's/^v//')
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
fi
- name: Update chart version
run: ./yq -i e '.version = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml
- name: Update app version
run: ./yq -i e '.appVersion = "${{ env.RELEASE_VERSION }}"' chart/Chart.yaml
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.8.0
- name: Package Helm chart
run: |
make chart
- name: Clone charts repo
uses: actions/checkout@v3
with:
repository: "${{ github.repository_owner }}/charts"
path: charts
token: "${{ secrets.FLANKBOT }}"
- name: Update chart repo
run: |
cd charts
cp ../mission-control-tenant-*.tgz ./
helm repo index --merge index.yaml .
- name: Push changes to chart repo
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Release ${{ needs.semantic-release.outputs.release-version }} of ${{ github.repository }}"
branch: gh-pages
repository: ./charts