Skip to content

Better mobile scaling #12

Better mobile scaling

Better mobile scaling #12

Workflow file for this run

name: Build
on:
push:
tags:
- "*.*.*"
branches:
- "main"
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.20.0"
- uses: actions/setup-node@v4
name: 'Setup Node'
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: pnpm/action-setup@v4
name: 'Install pnpm'
with:
version: 9
run_install: false
- name: Prepare things
id: prepare
run: |
mkdir artifacts
# Extract version from tag
VERSION=$(git tag --points-at HEAD | head -n1)
if [[ "$VERSION" != "" ]]; then
echo "Release $VERSION of ${{ github.sha }}" > RELEASE.txt
echo >> RELEASE.txt
fi
- name: Build frontend
run: |
pnpm -C frontend build
- name: Build for Linux amd64
run: |
go build -o artifacts/praga-linux-amd64 cmd/praga/praga.go
- name: Build for Linux arm64
run: |
GOARCH=arm64 go build -o artifacts/praga-linux-arm64 cmd/praga/praga.go
- name: Build for Windows amd64
run: |
GOOS=windows GOARCH=amd64 go build -o artifacts/praga-windows-amd64.exe cmd/praga/praga.go
- name: Build for Windows arm64
run: |
GOOS=windows GOARCH=arm64 go build -o artifacts/praga-windows-arm64.exe cmd/praga/praga.go
# TODO: macOS build
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: |
artifacts
# Release tagged pushes
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: RELEASE.txt
files: artifacts/*