ci: use pushd/popd to correctly archive this #19
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: Build and release | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
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" | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
package_json_file: frontend/package.json | |
- 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 build/bin/VencordInstaller.zip build/bin/Vencord\ Installer.app && popd | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }} | |
path: build/bin/VencordInstaller* |