forked from opensearch-project/opensearch-k8s-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.59 KB
/
release.yaml
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
name: "Publish Release from tag"
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
environment:
name: k8s-operator
name: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: 'go.work'
cache: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: set Env
id: github-ver
run: |
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Make sure helm chart has correct versions
run: |
sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml
sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-operator/Chart.yaml
sed -i -e 's/^appVersion:.*/appVersion: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml
sed -i -e 's/^version:.*/version: '$RELEASE_VERSION'/' charts/opensearch-cluster/Chart.yaml
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.14.3
- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@master
with:
charts_dir: charts/
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v2
id: create_release
with:
draft: true
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: ${{ github.ref }}