diff --git a/.github/workflows/on-release.yaml b/.github/workflows/on-release.yaml new file mode 100644 index 0000000..51a99d3 --- /dev/null +++ b/.github/workflows/on-release.yaml @@ -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/upload-to-github-release@v1.6.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref_name || inputs.tag }} + file: networkHub-${{ matrix.goos }}-${{ matrix.goarch }}${{ runner.os == 'Windows' && '.exe' }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 56e3a42..9a092bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 diff --git a/environments/local/local_test.go b/environments/local/local_test.go index 68d0d8a..de79449 100644 --- a/environments/local/local_test.go +++ b/environments/local/local_test.go @@ -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), ) diff --git a/go.mod b/go.mod index 479d6fa..729b5db 100644 --- a/go.mod +++ b/go.mod @@ -46,4 +46,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.19 +go 1.21