@@ -3,49 +3,41 @@ name: Release
33on :
44 push :
55 tags :
6- - " *"
6+ - " *"
77
88jobs :
99 dist :
1010 runs-on : ubuntu-latest
1111 steps :
12- - uses : actions/checkout@v2
13- with :
14- fetch-depth : 0
15- - name : Determine Go version from go.mod
16- run : echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
17- - uses : actions/setup-go@v2
18- with :
19- go-version : ${{ env.GO_VERSION }}
20- - uses : actions/cache@v2
21- with :
22- path : ~/go/pkg/mod
23- key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
24- restore-keys : |
25- ${{ runner.os }}-go-
26- - name : Import GPG signing key
27- uses : crazy-max/ghaction-import-gpg@v4
28- with :
29- gpg_private_key : ${{ secrets.SIGNING_KEY }}
30- - name : Login to Docker hub
31- run : docker login -u "${{ secrets.DOCKER_HUB_USER }}" -p "${{ secrets.DOCKER_HUB_PASSWORD }}"
32- - name : Login to quay.io
33- run : docker login -u "${{ secrets.QUAY_IO_USER }}" -p "${{ secrets.QUAY_IO_PASSWORD }}" quay.io
34- - name : Build changelog from PRs with labels
35- id : build_changelog
36- uses : mikepenz/release-changelog-builder-action@v2
37- with :
38- configuration : " .github/changelog-configuration.json"
39- # PreReleases still get a changelog, but the next full release gets a diff since the last full release,
40- # combining possible changelogs of all previous PreReleases in between. PreReleases show a partial changelog
41- # since last PreRelease.
42- ignorePreReleases : " ${{ !contains(github.ref, '-rc') }}"
43- outputFile : .github/release-notes.md
44- env :
45- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46- - name : Publish releases
47- uses : goreleaser/goreleaser-action@v2
48- with :
49- args : release --release-notes .github/release-notes.md
50- env :
51- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+ - uses : actions/setup-go@v5
16+ with :
17+ go-version-file : go.mod
18+ - name : Import GPG signing key
19+ uses : crazy-max/ghaction-import-gpg@v4
20+ with :
21+ gpg_private_key : ${{ secrets.SIGNING_KEY }}
22+ - name : Login to Docker hub
23+ run : docker login -u "${{ secrets.DOCKER_HUB_USER }}" -p "${{ secrets.DOCKER_HUB_PASSWORD }}"
24+ - name : Login to quay.io
25+ run : docker login -u "${{ secrets.QUAY_IO_USER }}" -p "${{ secrets.QUAY_IO_PASSWORD }}" quay.io
26+ - name : Build changelog from PRs with labels
27+ id : build_changelog
28+ uses : mikepenz/release-changelog-builder-action@v2
29+ with :
30+ configuration : " .github/changelog-configuration.json"
31+ # PreReleases still get a changelog, but the next full release gets a diff since the last full release,
32+ # combining possible changelogs of all previous PreReleases in between. PreReleases show a partial changelog
33+ # since last PreRelease.
34+ ignorePreReleases : " ${{ !contains(github.ref, '-rc') }}"
35+ outputFile : .github/release-notes.md
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ - name : Publish releases
39+ uses : goreleaser/goreleaser-action@v2
40+ with :
41+ args : release --release-notes .github/release-notes.md
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments