-
Notifications
You must be signed in to change notification settings - Fork 95
95 lines (95 loc) · 2.54 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Release
on:
push:
tags:
- v*
jobs:
release-binaries:
name: Release binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: "^1.22"
- run: go build -o sshesame-linux-amd64
env:
GOOS: linux
GOARCH: amd64
- run: go build -o sshesame-linux-armv6
env:
GOOS: linux
GOARCH: arm
GOARM: 6
- run: go build -o sshesame-linux-armv7
env:
GOOS: linux
GOARCH: arm
GOARM: 7
- run: go build -o sshesame-linux-arm64
env:
GOOS: linux
GOARCH: arm64
- run: go build -o sshesame-macos-amd64
env:
GOOS: darwin
GOARCH: amd64
- run: go build -o sshesame-macos-arm64
env:
GOOS: darwin
GOARCH: arm64
- run: go build -o sshesame-windows-amd64.exe
env:
GOOS: windows
GOARCH: amd64
- run: go build -o sshesame-windows-armv7.exe
env:
GOOS: windows
GOARCH: arm
GOARM: 7
- run: go build -o sshesame-windows-arm64.exe
env:
GOOS: windows
GOARCH: arm64
- uses: softprops/action-gh-release@v1
with:
files: |
sshesame-linux-amd64
sshesame-linux-armv6
sshesame-linux-armv7
sshesame-linux-arm64
sshesame-macos-amd64
sshesame-macos-arm64
sshesame-windows-amd64.exe
sshesame-windows-armv7.exe
sshesame-windows-arm64.exe
sshesame.yaml
release-docker-images:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
name: Release Docker images
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}