Skip to content

Commit 8f62c2e

Browse files
Ilya VinokurovIlya Vinokurov
Ilya Vinokurov
authored and
Ilya Vinokurov
committed
github actions
1 parent e87a922 commit 8f62c2e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/release.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Go
15+
uses: actions/setup-go@v4
16+
with:
17+
go-version: "1.21"
18+
19+
- name: Build for multiple platforms
20+
run: |
21+
mkdir -p builds
22+
GOOS=linux GOARCH=amd64 go build -o builds/tcp_client_linux_amd64 ./tcp_client
23+
GOOS=windows GOARCH=amd64 go build -o builds/tcp_client_windows_amd64.exe ./tcp_client
24+
GOOS=darwin GOARCH=amd64 go build -o builds/tcp_client_darwin_amd64 ./tcp_client
25+
26+
- name: Create Release
27+
uses: softprops/action-gh-release@v1
28+
with:
29+
files: |
30+
builds/*
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)