You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.0 KiB
69 lines
2.0 KiB
name: Build electron assets
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
arch: amd64
|
|
build: buildLinux
|
|
- os: ubuntu-latest
|
|
arch: arm64
|
|
build: buildLinux
|
|
- os: macos-latest
|
|
arch: amd64
|
|
build: buildIOS
|
|
- os: macos-latest
|
|
arch: arm64
|
|
build: buildIOS
|
|
- os: windows-latest
|
|
arch: amd64
|
|
build: buildWindows
|
|
# - os: windows-latest
|
|
# arch: 386
|
|
# build: buildWindows386
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.22'
|
|
|
|
- name: Check Go version
|
|
run: go version
|
|
|
|
- name: Install ARM64 cross-compilation toolchain
|
|
if: matrix.arch == 'arm64' && matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
|
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
|
echo "CXX=aarch64-linux-gnu-g++" >> $GITHUB_ENV
|
|
|
|
- name: Setup and build on Windows ${{ matrix.arch }}
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
./bootstrap_install_mage.bat
|
|
mage ${{ matrix.build }}
|
|
|
|
- name: Setup and build on ${{ matrix.os }} ${{ matrix.arch }}
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
sudo bash ./bootstrap_install_mage.sh
|
|
export GOARCH=${{ matrix.arch }}
|
|
sudo -E mage ${{ matrix.build }}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.os }}-${{ matrix.arch }}-assets
|
|
path: shared/${{ (matrix.os == 'macos-latest' && 'ios' || (matrix.os == 'windows-latest' && 'windows' || 'linux')) }}/
|
|
|