Skip to content

Commit

Permalink
Merge branch 'main' into add_artifact_check
Browse files Browse the repository at this point in the history
  • Loading branch information
leszek-vechain authored Jun 13, 2024
2 parents 303b444 + d49d7ab commit 59be35c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release, eg. v0.0.1'
required: true

permissions:
contents: write

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
include:
# TODO: Add support for arm based runners when GH makes them generally available
- runner: macos-latest
goos: darwin
goarch: arm64
- runner: ubuntu-latest
goos: linux
goarch: amd64
- runner: windows-latest
goos: windows
goarch: amd64
runs-on: ${{ matrix.runner }}

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 network-hub-${{ matrix.goos == 'darwin' && 'macos' || matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' || '' }} ./cmd/main.go
- name: Upload Executable
uses: xresloader/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ inputs.tag || github.ref_name }}
file: network-hub-${{ matrix.goos == 'darwin' && 'macos' || matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' || '' }}
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: 1.21.x

- name: Make Test
id: unit-test
Expand Down

0 comments on commit 59be35c

Please sign in to comment.