Skip to content

Commit

Permalink
Merge pull request #3 from vechain/add-release-step
Browse files Browse the repository at this point in the history
Add release step
  • Loading branch information
darrenvechain authored Jun 11, 2024
2 parents a98b88e + 07e97fa commit 0838fc8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/on-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
tags:
- '*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release'
required: true
default: 'v0.0.0'

permissions:
contents: write

jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- os: ubuntu-latest
goos: linux
- os: macos-latest
goos: darwin
- os: windows-latest
goos: windows
goarch: [ 386, amd64, arm, arm64 ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19.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' }}
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.19.x
go-version: 1.21.x

- name: Make Test
id: unit-test
Expand Down
2 changes: 1 addition & 1 deletion environments/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ var networkJSON = fmt.Sprintf(`{
}`, genesis, genesis, genesis)

func TestLocal(t *testing.T) {
//t.Skip()
t.Skip()
networkCfg, err := network.NewNetwork(
network.WithJSON(networkJSON),
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.19
go 1.21

0 comments on commit 0838fc8

Please sign in to comment.