-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (46 loc) · 1.39 KB
/
Release linux binaries.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
name: Go
on:
workflow_dispatch:
# branches:
# - master #STOP
jobs:
build:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: '>=1.19.2'
id: go
- name: Checkout code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v -o binary1
# Add more binaries if needed; adjust the names accordingly
- name: List generated files
run: ls -la
- name: Install tshark as a prerequisite for testing
run: |
sudo sh -c 'export DEBIAN_FRONTEND=noninteractive ; apt -y update && apt -y install tshark'
- name: Test
run: go test -v ./...
- name: Create Tarball
run: tar -czvf release.tar.gz ./binary1
# Add more binaries if needed; adjust the names accordingly
- name: List artifacts
run: ls -la
- name: Create Release and Upload Artifacts
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
with:
tag_name: v0.0.1
release_name: Release v0.0.1
body: Test build and release binaries remotely.
draft: false
prerelease: false
files: release.tar.gz