Skip to content

add tests and minor typo fixed #3

add tests and minor typo fixed

add tests and minor typo fixed #3

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.21'
- name: Build
run: make build
- name: Run tests
run: make test
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Upload Executable
id: upload-executable
uses: actions/upload-artifact@v2
with:
name: my-executable
path: ./netexecgo
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Attach Executable to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./netexecgo
asset_name: netexecgo
asset_content_type: application/octet-stream