-
Notifications
You must be signed in to change notification settings - Fork 18
49 lines (42 loc) · 1.23 KB
/
main.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
name: Build SSHizzle
on:
push:
tags:
- "*"
pull_request:
branches:
- master
- main
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build
run: |
VERSION=$(echo $REF | cut -d "/" -f3)
echo $VERSION
GOOS=windows GOARCH=386 go build -o ./bin/sshizzle-ca-$VERSION-windows-amd64.exe ./cmd/sshizzle-ca/sshizzle-ca.go
go build -o ./bin/sshizzle-agent-$VERSION-linux-amd64 ./cmd/sshizzle-agent/sshizzle-agent.go
go build -o ./bin/sshizzle-host-$VERSION-linux-amd64 ./cmd/sshizzle-host/sshizzle-host.go
env:
REF: ${{ github.ref }}
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
./bin/*