-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (61 loc) · 2.03 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
65
66
67
68
69
name: Release
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- 'CODEOWNERS'
- '**.md'
- 'example'
- 'util'
- 'bin'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_TOKEN }}
# issue: https://github.com/helm/chart-releaser-action/issues/113
- name: Force tags download
run: |
git pull --tags
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Semantic release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
dry_run: true
semantic_version: 19.0.5
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump new version
if: steps.semantic.outputs.new_release_published == 'true'
run: |
yq -i ".version = \"${{ steps.semantic.outputs.new_release_version }}\"" "charts/microservice-chart/Chart.yaml"
git add "charts/microservice-chart/Chart.yaml"
git commit -m "Bump microservice chart version ${{ steps.semantic.outputs.new_release_version }}"
git push -u origin main
- name: Setup Helm
if: steps.semantic.outputs.new_release_published == 'true'
run: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Run chart-releaser
if: steps.semantic.outputs.new_release_published == 'true'
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.RELEASE_TOKEN }}"