ci remove unuseful file #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wails build | |
on: | |
push: | |
tags: | |
# Match any new tag | |
- '*' | |
env: | |
# Necessary for most environments as build failure can occur due to OOM issues | |
NODE_OPTIONS: "--max-old-space-size=4096" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ | |
# { name: stable-diffusion-desktop, platform: linux/amd64, os: ubuntu-latest }, | |
{ name: stable-diffusion-desktop, platform: windows/amd64, os: windows-latest }, | |
{ name: stable-diffusion-desktop, platform: darwin/universal, os: macos-latest } | |
] | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup GoLang | |
uses: actions/setup-go@v4 | |
with: | |
check-latest: true | |
go-version: ^1.21 | |
- run: go version | |
shell: bash | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
shell: bash | |
- name: Install Linux Wails deps | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu | |
shell: bash | |
- name: Install macOS Wails deps | |
if: runner.os == 'macOS' | |
run: brew install mitchellh/gon/gon | |
shell: bash | |
- name: Build Mac App | |
if: runner.os == 'macOS' | |
run: wails build --platform ${{ matrix.build.platform }} -webview2 download -o ${{ matrix.build.name }} | |
shell: bash | |
- name: Build Linux App | |
if: runner.os == 'Linux' | |
run: wails build --platform ${{ matrix.build.platform }} -webview2 download -o ${{ matrix.build.name }} | |
shell: bash | |
- name: Build Windows App + Installer | |
if: runner.os == 'Windows' | |
run: | | |
wails build --platform ${{ matrix.build.platform }} -webview2 download -nsis -o ${{ matrix.build.name }} | |
rm ${{ matrix.build.name }} | |
shell: bash | |
- name: Build .app zip file | |
if: runner.os == 'macOS' | |
working-directory: ./build/bin | |
shell: bash | |
run: | | |
ditto -c -k --keepParent ./${{ matrix.build.name }}.app ./${{ matrix.build.name }}.app.zip | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Wails Build ${{runner.os}} ${{ matrix.build.name }} | |
path: | | |
*/bin/ | |
*\bin\* | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
*/bin/* |