-
Notifications
You must be signed in to change notification settings - Fork 11
52 lines (51 loc) · 2.06 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
name: Release kuberpult with semantic versioning
on:
workflow_dispatch:
jobs:
release:
name: Release kuberpult with semantic versioning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for git describe/VERSION in Makefile
- name: Identify version to create
uses: go-semantic-release/action@v1
id: new-semrel-version
with:
dry: true
ghr: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create helm chart for release
run: |
make -C charts/kuberpult release-tag VERSION=v${{ steps.new-semrel-version.outputs.version }}
- name: Login to Google Artifact Registry
uses: docker/login-action@v2
with:
registry: europe-west3-docker.pkg.dev
username: _json_key
password: ${{ secrets.GCP_ARTIFACT_REGISTRY_PUSH_JSON_KEY }}
- name: Re-tag service images with release version for google docker registry
run: |
git fetch --tags # this should have been done by the checkout action before.
make tag-release-images RELEASE_IMAGE_TAG=v$RELEASE_IMAGE_VERSION
env:
RELEASE_IMAGE_VERSION: ${{ steps.new-semrel-version.outputs.version }}
- name: Re-tag service images with release version for github docker registry
run: |
make tag-release-images RELEASE_IMAGE_TAG=v$RELEASE_IMAGE_VERSION DOCKER_REGISTRY_URI=ghcr.io/freiheit-com/kuberpult
env:
RELEASE_IMAGE_VERSION: ${{ steps.new-semrel-version.outputs.version }}
- name: Create release
uses: go-semantic-release/action@v1
id: semrel
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
changelog-generator-opt: "emojis=true"
- name: Append helm chart to release
run: |
echo $VERSION
gh release upload v$VERSION charts/kuberpult/kuberpult-v$VERSION.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.semrel.outputs.version }}