forked from StackExchange/dnscontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.5 KB
/
release_draft.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*
name: "Release: Make release candidate"
jobs:
draft_release:
name: draft release
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pull-requests: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
# Why "fetch-depth: 0"? To generate the release notes, we need the
# full git history. A shallow checkout would make release notes going
# back one commit.
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.22
# Stringer is needed because .goreleaser includes "go generate ./..."
- name: Install stringer
run: |
go install golang.org/x/tools/cmd/stringer@latest
-
id: release
name: Goreleaser release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}