Skip to content

Release v1.8.6

Release v1.8.6 #92

Workflow file for this run

name: Build GUI.for.SingBox
on:
push:
tags:
- "v*"
jobs:
Build:
permissions: write-all
strategy:
fail-fast: false
matrix:
build:
- os: windows-latest
GOOS: windows
GOARCH: amd64
- os: windows-latest
GOOS: windows
GOARCH: arm64
- os: windows-latest
GOOS: windows
GOARCH: 386
- os: macos-latest
GOOS: darwin
GOARCH: amd64
- os: macos-latest
GOOS: darwin
GOARCH: arm64
- os: ubuntu-latest
GOOS: linux
GOARCH: amd64
# - os: ubuntu-latest
# GOOS: linux
# GOARCH: arm64
runs-on: ${{ matrix.build.os }}
env:
APP_NAME: GUI.for.SingBox
ZIP_FILE: GUI.for.SingBox-${{ matrix.build.GOOS }}-${{ matrix.build.GOARCH }}.zip
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: go version
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm -v
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml
- run: node -v
- name: Install dependencies
run: |
cd frontend && pnpm install
go install github.com/wailsapp/wails/v2/cmd/wails@latest
# Dependencies: GNU/Linux
- name: Update system and dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build Frontend
run: cd frontend && pnpm build
# Build
- name: Build for ${{ matrix.build.GOOS }}-${{ matrix.build.GOARCH }}
env:
GOOS: ${{ matrix.build.GOOS }}
GOARCH: ${{ matrix.build.GOARCH }}
run: ~/go/bin/wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_41 -o ${{ env.APP_NAME }}.exe
# Compress: macOS
- name: Create a compressed file for macOS
if: runner.os == 'macOS'
run: |
cd ./build/bin
# The compiled product name of macos is always "${{ env.APP_NAME }}.app"
zip -q -r ${{ env.ZIP_FILE }} ${{ env.APP_NAME }}.app
# Compress: Windows
- name: Create a compressed file for Windows
if: runner.os == 'Windows'
run: |
cd ./build/bin
Compress-Archive -Path ${{ env.APP_NAME }}.exe -DestinationPath ${{ env.ZIP_FILE }}
# Compress: GNU/Linux
- name: Create a compressed file for GNU/Linux
if: runner.os == 'Linux'
run: |
cd ./build/bin
mv ${{ env.APP_NAME }}.exe ${{ env.APP_NAME }}
zip ${{ env.ZIP_FILE }} ${{ env.APP_NAME }}
# Artifact
# - name: Upload Artifact ${{ env.ZIP_FILE }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.ZIP_FILE }}
# path: ./build/bin/${{ env.ZIP_FILE }}
- name: Create Release and Upload Assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/bin/${{ env.ZIP_FILE }}
asset_name: ${{ env.ZIP_FILE }}
tag: ${{ github.ref }}
release_name: ${{ github.ref_name }}
overwrite: true
draft: false
prerelease: false
body: |
Auto-generated release from GitHub Actions.