-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.86 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
push:
tags:
- v*
workflow_dispatch: {}
permissions:
contents: write
jobs:
release:
name: Release
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch Git tags
run: git fetch --force --tags
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.6 # datasource=github-releases depName=golang/go
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Login to DockerHub
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Configure AWS credentials
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
- name: Login to Amazon ECR Public
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Goreleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: 1.24.0 # datasource=github-releases depName=goreleaser/goreleaser
args: release --config=.goreleaser-release.yaml --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}