-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (68 loc) · 1.96 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
69
70
71
72
73
74
75
76
77
78
79
80
# .github/workflows/release.yml
name: goreleaser
on:
push:
# run only against tags
tags:
- "*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up go
uses: actions/setup-go@v5
with:
go-version: stable
- name: run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
distro_matrix:
strategy:
matrix:
os: [alpine, rocky-8, rocky-9, ubuntu-focal, ubuntu-jammy, ubuntu-noble]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: login to dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker meta
uses: docker/metadata-action@v5
id: meta
with:
images: m0rf30/yap-${{ matrix.os }}
labels: |
maintainer=Yap
org.opencontainers.image.authors=M0Rf30
org.opencontainers.image.title=yap
org.opencontainers.image.description=Package software with ease 📦
org.opencontainers.image.vendor=M0Rf30
tags: |
type=ref,event=tag
- name: get the git tag
if: startsWith(github.ref, 'refs/tags/')
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: m0rf30/yap-${{ matrix.os }}:${{ env.TAG }}
file: build/deploy/${{ matrix.os }}/Dockerfile