7 Commits

Author SHA1 Message Date
5c958b2b2d fuuuck 2025-02-16 08:49:04 +01:00
afb5f05e8d fuuck 2025-02-16 08:47:20 +01:00
f372032b21 fix: fuck i forgot 2025-02-16 08:44:40 +01:00
495d423f2e fix: release workflow 2025-02-16 08:41:58 +01:00
c0ac782dcb build: add release workflow 2025-02-16 08:38:46 +01:00
334b9aacc6 build: add build workflow 2025-02-14 21:21:22 +01:00
c72bc90146 fix: trim \x00 2025-02-14 21:03:12 +01:00
3 changed files with 70 additions and 1 deletions

26
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Build Go
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build
run: go build
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: holesail-proxy
path: holesail-proxy

43
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,43 @@
name: Release
permissions: write-all
on:
push:
tags:
- "v*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
os:
- windows
- linux
- darwin
arch:
- amd64
- arm64
exclude:
- os: windows
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.23'
- name: Build binary
run: |
export GOOS=${{ matrix.os }}
export GOARCH=${{ matrix.arch }}
go build
- name: Pack binary
run: zip holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip holesail-proxy${{ matrix.os == 'windows' && '.exe' || '' }}
- name: Create release
uses: ncipollo/release-action@v1.15.0
with:
tag: ${{ needs.create-tag.outputs.new_tag }}
artifacts: holesail-proxy-${{ matrix.os }}-${{ matrix.arch }}.zip
allowUpdates: true

View File

@ -58,8 +58,8 @@ var upCmd = &cobra.Command{
outWithoutBloat := outSplitted[len(outSplitted)-1]
outWithoutBloat = strings.Split(outWithoutBloat, "--port")[1]
outWithoutBloat = strings.Trim(outWithoutBloat, "\x00")
fmt.Print(outWithoutBloat)
freePort, _ = strconv.Atoi(outWithoutBloat)
}
}