Skip to content

Update Release linux binaries.yml #2

Update Release linux binaries.yml

Update Release linux binaries.yml #2

name: Go
on:
push:
branches:
- master
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
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 }}