-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (49 loc) · 1.52 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
54
55
on:
release:
types: [created]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-20.04
strategy:
matrix:
goos: [linux]
goarch: [amd64]
steps:
- uses: actions/[email protected]
- uses: lmangani/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz"
pre_command: export CGO_ENABLED=1
project_path: "."
binary_name: "quackpipe"
asset_name: quackpipe-${{ matrix.goarch }}
executable_compression: upx
compress_assets: OFF
build_flags: -buildvcs=false
#ldflags: "-linkmode external -extldflags -static"
extra_files: LICENSE README.md
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}