-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (41 loc) · 1.53 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
name: Release
on:
push:
tags:
- "*"
jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2 | cut -d "." -f 1,2)" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Login to Docker hub
run: docker login -u "${{ secrets.DOCKER_HUB_USER }}" -p "${{ secrets.DOCKER_HUB_PASSWORD }}"
- name: Login to quay.io
run: docker login -u "${{ secrets.QUAY_IO_USER }}" -p "${{ secrets.QUAY_IO_PASSWORD }}" quay.io
- name: Generate artifacts
run: make crd
- name: Build changelog from PRs with labels
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
with:
configuration: ".github/changelog-configuration.json"
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
# combining possible changelogs of all previous PreReleases in between. PreReleases show a partial changelog
# since last PreRelease.
ignorePreReleases: "${{ !contains(github.ref, '-rc') }}"
outputFile: .github/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish releases
uses: goreleaser/goreleaser-action@v3
with:
args: release --release-notes .github/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}