Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
basket-ball committed Jan 11, 2024
1 parent cfdef00 commit ec1142d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
name: Main

on:
push:
tags:
- "v*.*.*"
push:
tags:
- 'v*.*.*'

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: actions/setup-go@v4
with:
go-version: '1.18'
run: |
go get .
build.bat
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
releases/portscan.exe
releases/portscan
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
uses: actions/setup-go@v4
with:
go-version: '1.18'
run: |
go env CGO_ENABLED=0
go env GOOS=windows
go env GOARCH=amd64
go build -o releases/portscan.exe
go env CGO_ENABLED=0
go env GOOS=linux
go env GOARCH=amd64
go build -ldflags="-s -d" -o releases/portscan
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
releases/portscan.exe
releases/portscan
12 changes: 6 additions & 6 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@echo off
set CGO_ENABLED=0
set GOOS=windows
set GOARCH=amd64
go env CGO_ENABLED=0
go env GOOS=windows
go env GOARCH=amd64
go build -o releases/portscan.exe
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
go env CGO_ENABLED=0
go env GOOS=linux
go env GOARCH=amd64
go build -ldflags="-s -d" -o releases/portscan

0 comments on commit ec1142d

Please sign in to comment.