Skip to content

Create Release linux binaries.yml #1

Create Release linux binaries.yml

Create Release linux binaries.yml #1

name: Go
on: [push]
jobs:
build:
name: Build
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: Check out 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 ./...
- name: Install tshark as 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: Zip Binaries
# run: zip -r binaries.zip ./path/to/your/binary1 ./path/to/your/binary2
- name: Create Tarball
run: tar -czvf binaries.tar.gz ./path/to/your/binary1 ./path/to/your/binary2
- name: Create Release and Upload Artifacts
uses: actions/create-release@v1
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
token: ${{ secrets.GITHUB_TOKEN }}