-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (51 loc) · 1.38 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
name: release
on:
push:
tags:
- "v*.*.*"
jobs:
release-binaries:
name: Release binaries
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Build release packages
run: make release
- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: release/*
release-image:
name: Release OCI image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
CONTAINER_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USERNAME: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.CONTAINER_REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache-dependency-path: go.sum
- name: Build and push image
run: make image COMPRESS=true PUSH=true