-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.33 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (45 loc) · 1.33 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
packages: write # push the telemetry-server image to GHCR
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.25"
cache: true
# The telemetry-server image is built for linux/amd64 and linux/arm64;
# QEMU + buildx let the amd64 runner assemble the arm64 layers.
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Select release notes
id: notes
run: |
file="docs/release-notes/${GITHUB_REF_NAME}.md"
if [ -f "$file" ]; then
echo "args=release --clean --release-notes=$file" >> "$GITHUB_OUTPUT"
else
echo "args=release --clean" >> "$GITHUB_OUTPUT"
fi
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: ${{ steps.notes.outputs.args }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}