-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 1.82 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: release
on:
push:
tags:
- 'v*.*.*'
env:
IMAGE_REPO: ghcr.io/moolen/skouter
jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: softprops/action-gh-release@v1
with:
body: |
## Container Image
${{ env.IMAGE_REPO }}:${{ github.ref_name }}
releases-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
id-token: write
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64, arm64]
exclude:
- goarch: "386"
goos: darwin
- goarch: arm64
goos: windows
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Promote docker image
run: |
docker pull ${{ env.IMAGE_REPO }}:main
docker tag ${{ env.IMAGE_REPO }}:main ${{ env.IMAGE_REPO }}:${{ github.ref_name }}
docker push ${{ env.IMAGE_REPO }}:${{ github.ref_name }}
- name: "sign image"
uses: ./.github/actions/sign
with:
image-name: ${{ env.IMAGE_REPO }}
image-tag: ${{ github.ref_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release binary
uses: wangyoucao577/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.19.1.linux-amd64.tar.gz"
project_path: "./cmd/kubectl-blame"
binary_name: "kubectl-blame"