-
Notifications
You must be signed in to change notification settings - Fork 59
59 lines (50 loc) · 1.74 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
name: Release Chart
on:
push:
branches:
- main
workflow_dispatch:
env:
helm-version: v3.11.0
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: ${{ env.helm-version }}
- name: Get helm chart version
run: echo "CHART_VERSION=$(grep '^version:' chart/Chart.yaml | cut -d ":" -f2 | tr -d ' ')" >> $GITHUB_ENV
- name: Create package
env:
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.ORG_AWS_HELM_CHART_BUCKET_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_AWS_HELM_CHART_BUCKET_SECRET_ACCESS_KEY }}
run: |
mkdir -p chart_release
helm dep up chart
helm package chart -d chart_release/
helm plugin install https://github.com/hypnoglow/helm-s3.git --version 0.13.0
helm repo add tscharts s3://charts.timescale.com
helm s3 push chart_release/* tscharts --acl public-read --relative --dry-run
- name: Push package
env:
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.ORG_AWS_HELM_CHART_BUCKET_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_AWS_HELM_CHART_BUCKET_SECRET_ACCESS_KEY }}
run: |
helm s3 push chart_release/* tscharts --acl public-read --relative
- name: Create release
uses: ncipollo/release-action@v1.12.0
with:
tag: ${{ env.CHART_VERSION }}
allowUpdates: true
generateReleaseNotes: true
artifacts: "chart_release/*.tgz"