-
Notifications
You must be signed in to change notification settings - Fork 70
84 lines (72 loc) · 2.47 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Release helm chart
on:
workflow_call:
secrets:
github-token:
required: true
inputs:
chartVersion:
type: string
required: true
tag:
type: string
required: true
env:
REPO: 'RocketChat/helm-charts'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Clone helm repo
uses: actions/checkout@v2
with:
repository: ${{ env.REPO }}
path: ./helm-charts
token: ${{ secrets.github-token }}
- name: Clone helm repo (gh-pages)
uses: actions/checkout@v2
with:
repository: ${{ env.REPO }}
ref: gh-pages
path: ./gh-pages
token: ${{ secrets.github-token }}
- name: Update chart and rocketchat versions
shell: bash
id: version
run: |
sed -i -r '/^appVersion:/ s/ .+/ ${{ inputs.tag }}/' ./helm-charts/rocketchat/Chart.yaml
sed -i -r '/^version:/ s/ .+/ ${{ inputs.chartVersion }}/' ./helm-charts/rocketchat/Chart.yaml
- name: Pull dependencies
shell: bash
run: helm dependency update ./helm-charts/rocketchat
- name: Generate helm package
shell: bash
run: helm package ./helm-charts/rocketchat -d gh-pages/charts/
- name: Re-generate helm index
run: helm repo index ./gh-pages/
- name: Push to master
uses: EndBug/add-and-commit@v9
with:
add: "rocketchat/Chart.yaml"
cwd: helm-charts
message: "Chore: bump Rocket.Chat and chart version to ${{ inputs.chartVersion }} with Rocket.Chat version ${{ inputs.tag }}"
push: true
- name: Push to gh-pages
uses: EndBug/add-and-commit@v9
with:
add: "."
cwd: gh-pages
message: "Chore: bump Rocket.Chat and chart version to ${{ inputs.chartVersion }} with Rocket.Chat version ${{ inputs.tag }}"
push: true
- name: Create a release with artifact
uses: softprops/action-gh-release@v1
with:
files: ${{ format('./gh-pages/charts/rocketchat-{0}.tgz', inputs.chartVersion) }}
prerelease: false
repository: ${{ env.REPO }}
token: ${{ secrets.github-token }}
name: ${{ inputs.chartVersion }}
tag_name: ${{ inputs.chartVersion }}
body: ${{ format('https://github.com/RocketChat/Rocket.Chat/releases/{0}', inputs.tag) }}
generate_release_notes: true
draft: false