-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (43 loc) · 1.2 KB
/
release.yaml
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:
# version tags are protected in this repository
tags:
- "v*"
permissions:
# required for OIDC token used as the signing identity
id-token: write
# required to publish the release
contents: write
jobs:
goreleaser:
# deploy with the correct environment to allow DockerHub access
environment: 'Publish'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Install Cosign
uses: sigstore/cosign-installer@v3
with:
cosign-release: 'v2.4.0'
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: '${{ vars.DOCKERHUB_USER }}'
password: '${{ secrets.DOCKERHUB_TOKEN }}'
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v2.3.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KO_DOCKER_REPO: "chinmina" # the DockerHub chinmina repository