-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.4 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
54
55
56
57
58
59
name: Release
on:
push:
tags:
- 'v*.*.*'
env:
RELEASE_VERSION: ${{ github.ref_name }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
- name: Build and push
run: |
make docker-build docker-push
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
release:
needs: build-and-push
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Build Changelog"
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: ".github/workflows/changelog_builder/config.json"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.PAT }}
tag_name: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
generate_release_notes: true