Skip to content

Release

Release #9

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
default: 'v0.0.1'
permissions:
contents: write
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
goos: darwin
goarch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -v -o networkHub-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/main.go
- name: Upload Executable
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name || inputs.tag }}
file: networkHub-${{ matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' }}