Support prerelease version numbers in nsis installer #11
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: Build for win and linux | |
on: | |
push: | |
env: | |
GO_VERSION: "1.21" | |
NODE_VERSION: "18" | |
PNPM_VERSION: "8.6.1" | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
include: | |
- os: ubuntu-latest | |
artifactName: linux | |
buildArgs: '' | |
- os: windows-latest | |
artifactName: windows | |
buildArgs: -nsis | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'pnpm' | |
cache-dependency-path: frontend | |
- name: Install additional dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt -y install libgtk-3-dev libwebkit2gtk-4.0-dev | |
- name: Install Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
- name: Generate files | |
run: go generate -x -tags tools ./... | |
- name: Build | |
run: wails build ${{ matrix.buildArgs }} | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.artifactName }} | |
path: build/bin/* | |
lint-backend: | |
runs-on: windows-latest # TODO: golangci-lint only lints the files for the current OS, so we need to run it on both | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 | |
only-new-issues: true | |
skip-pkg-cache: true | |
skip-build-cache: true | |
lint-frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: 'pnpm' | |
cache-dependency-path: frontend | |
- name: Install dependencies | |
working-directory: frontend | |
run: pnpm install | |
- name: Lint | |
working-directory: frontend | |
run: | | |
pnpm lint | |
# disable check for now, as SMUI causes an error | |
# pnpm check |