Skip to content

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuzeyu authored Jul 6, 2024
1 parent e7fe079 commit d781601
Showing 1 changed file with 15 additions and 44 deletions.
59 changes: 15 additions & 44 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ on:
pull_request:
branches: [ main ]

env:
GITHUB_TOKEN: ${{ secrets.GOACTION }}

jobs:
build-linux:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: $(( secrets.GITHUB_TOKEN }}
strategy:
matrix:
target_arch: [aarch64, arm64, x86_64]
include:
- goarch: amd64
goos: linux
steps:
- uses: actions/[email protected]

Expand All @@ -27,49 +34,13 @@ jobs:
go build -o ./phantomsocks-pcap -tags pcap
go build -o ./phantomsocks-rawsocket -tags rawsocket
- name: upload
uses: actions/upload-artifact@v4
with:
name: linuxps-${{ matrix.target_arch }}
path: ./phantomsocks*

build-windows:
runs-on: windows-latest
steps:
- uses: actions/[email protected]

- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.19

- name: Build
run: |
go build -v ./...
go build -v -tags pcap ./...
go build -v -tags windivert ./...
- name: upload
uses: actions/upload-artifact@v4
uses: "marvinpinto/action-automatic-releases@latest"
with:
name: winps-${{ matrix.target_arch }}
path: ./phantomsocks*
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.version.outputs.version }}
prerelease: true
title: "Development Build"
files: |
./nodeUpgrade-${{ matrix.goos }}-${{ matrix.goarch }}.tgz
build-macos:
runs-on: macos-latest
steps:
- uses: actions/[email protected]

- name: Set up Go
uses: actions/[email protected]
with:
go-version: 1.19

- name: Build
run: |
go build -v ./...
go build -v -tags pcap ./...
- name: upload
uses: actions/upload-artifact@v4
with:
name: macps-${{ matrix.target_arch }}
path: ./phantomsocks*

0 comments on commit d781601

Please sign in to comment.