Skip to content

Commit

Permalink
pull_request.yml: fix builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Markson Hon authored and Markson Hon committed Nov 25, 2023
1 parent 1ae2689 commit c988e79
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
types: [opened, synchronize, reopened]
paths:
- "**/*.go"
- "service/go.mod"
- "service/go.sum"
- "service/**"
- "gui/**"
- ".github/workflows/*.yml"
jobs:
Expand Down Expand Up @@ -62,8 +61,6 @@ jobs:
commit=$(git -C "$CurrentDir" rev-parse --short HEAD)
version="unstable-$date.r${count}.$commit"
os="linux"
cd "$CurrentDir"/gui && yarn && OUTPUT_DIR="$CurrentDir"/service/server/router/web yarn build
find "$CurrentDir"/service/server/router/web \! -name \*.png -a \! -name \*.gz -a \! -name index.html -a ! -type d -exec gzip -9 {} +
cd "$CurrentDir"/service
for arch in amd64 arm64; do
GOARCH="$arch" CGO_ENABLED=0 go build -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya_bin/v2raya_pr_build_"$os"_"$arch"_"$version"
Expand Down Expand Up @@ -98,11 +95,10 @@ jobs:
count=$(git -C "$CurrentDir" rev-list --count HEAD)
commit=$(git -C "$CurrentDir" rev-parse --short HEAD)
version="unstable-$date.r${count}.$commit"
os="darwin"
cd "$CurrentDir"/gui && yarn && OUTPUT_DIR="$CurrentDir"/service/server/router/web yarn build
os="windows"
cd "$CurrentDir"/service
for arch in amd64 arm64; do
GOARCH="$arch" CGO_ENABLED=0 go build -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya_bin/v2raya_pr_build_"$os"_"$arch"_"$version"
GOARCH="$arch" CGO_ENABLED=0 go build -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya_bin/v2raya_pr_build_"$os"_"$arch"_"$version".exe
done
- name: Upload Zip File to Artifacts
uses: nanoufo/[email protected]
Expand Down Expand Up @@ -135,7 +131,6 @@ jobs:
commit=$(git -C "$CurrentDir" rev-parse --short HEAD)
version="unstable-$date.r${count}.$commit"
os="darwin"
cd "$CurrentDir"/gui && yarn && OUTPUT_DIR="$CurrentDir"/service/server/router/web yarn build
cd "$CurrentDir"/service
for arch in amd64 arm64; do
GOARCH="$arch" CGO_ENABLED=0 go build -tags "with_gvisor" -ldflags "-X github.com/v2rayA/v2rayA/conf.Version=$version -s -w" -o "$CurrentDir"/v2raya_bin/v2raya_pr_build_"$os"_"$arch"_"$version"
Expand Down

0 comments on commit c988e79

Please sign in to comment.