-
-
Notifications
You must be signed in to change notification settings - Fork 171
53 lines (44 loc) · 1.44 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
44
45
46
47
48
49
50
51
52
53
name: Release
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Docker login
if: success() && startsWith(github.ref, 'refs/tags/')
env:
DOCKER_USERNAME: ${{ secrets.dockerUsername }}
DOCKER_PASSWORD: ${{ secrets.dockerPassword }}
GITHUB_TOKEN: ${{ secrets.githubToken }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin quay.io
echo "${GITHUB_TOKEN}" | docker login docker.pkg.github.com -u helmich-bot --password-stdin
- name: Set current date
id: set_date
run: |
echo "BUILD_DATE=$(date)" >> $GITHUB_ENV
- name: Export signing key
run: 'echo "${{ secrets.PKG_SIGNING_KEY }}" > /tmp/signing-key'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: v1.11.5
args: release --rm-dist
env:
BUILD_USER: ${{ github.actor }} (via Github Actions)
GITHUB_TOKEN: ${{ secrets.githubToken }}