Skip to content

Formatting

Formatting #281

Workflow file for this run

name: Build release
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
# - ubuntu-latest
# - windows-latest
- macOS-latest
steps:
- uses: actions/checkout@v4
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v4
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }}
restore-keys: |
${{ runner.os }}-nimble-
if: runner.os != 'Windows'
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: '2.0.6'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Nim dependencies
run: nimble -y install koi osdialog riff semver winim with
- name: Inject version string
run: |
set -x
VERSION=$(./scripts/get-version.sh version-and-hash)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: macOS arm64 release build
run: nim -f releaseMacX64
- name: macOS x86-64 release build
run: nim -f releaseMacArm64
- name: Create macOS universal binary
run: nim mergeMacUniversal
- name: Create macOS app bundle
run: nim packageMacAppBundle
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: gridmonger-v${{ env.VERSION }}-macos
path: dist/macos/Gridmonger.app
overwrite: true