Build manual in the CI workflow #290
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 release | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
nimversion: | |
- binary:2.0.6 | |
os: | |
# - ubuntu-20.04 | |
# - windows-2019 | |
- macOS-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: iffy/install-nim@v5 | |
with: | |
version: ${{ matrix.nimversion }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Nim dependencies | |
run: nimble -y install koi osdialog riff semver winim with | |
- name: Install Sass | |
run: | | |
npm install -g sass | |
sass --version | |
- name: Install sphinx | |
run: | | |
pip install sphinx | |
sphinx-build --version | |
- name: Inject version string | |
run: | | |
set -x | |
VERSION=$(./scripts/get-version.sh version-and-hash) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Build manual | |
run: nim manual | |
- 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 packageMac | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gridmonger-v${{ env.VERSION }}-macos | |
path: dist/macos/gridmonger-v${{ env.VERSION }}-macos.zip |