-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 2.02 KB
/
Copy pathrelease.yml
File metadata and controls
65 lines (55 loc) · 2.02 KB
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
60
61
62
63
64
65
name: Release
on:
push:
tags:
- "v*"
env:
ghcr_latest_tag: "${{ github.ref_type == 'tag' && ',ghcr.io/vshn/appcat-cli:latest' || '' }}"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to ghcr.io
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build
uses: docker/build-push-action@v7
with:
# Without this the .git directory is not present and our tests fail
build-args: BUILDKIT_CONTEXT_KEEP_GIT_DIR=true
push: true
tags: "ghcr.io/vshn/appcat-cli:${{ github.ref_name }}${{ env.ghcr_latest_tag }}"
- name: Build changelog from PRs with labels
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v6
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@v7
with:
args: release --release-notes .github/release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}