Skip to content

refactor: misc changes #32

refactor: misc changes

refactor: misc changes #32

Workflow file for this run

name: Build and release
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Check formatting
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
cache: true
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
package_json_file: frontend/package.json
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Install Go dependencies
run: go mod download
- name: Build
run: wails build -ldflags "-s -w -X 'installer.InstallerGitHash=$(git rev-parse --short HEAD)' -X 'installer.InstallerTag=${{ github.ref_name }}'" -nosyncgomod
- name: ZIP Mac build
if: matrix.os == 'macos-latest'
run: pushd build/bin/ && zip -r VencordInstaller.zip Vencord\ Installer.app && popd
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}
path: build/bin/VencordInstaller*