Skip to content

Build and Package Artifacts #1

Build and Package Artifacts

Build and Package Artifacts #1

Workflow file for this run

name: Build and Package Artifacts
env:
OUT_FILE: hallowdale.zip
on: workflow_dispatch
jobs:
build-artifacts:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
ocaml-compiler:
- 4.13.1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Re-synchronize the package index files on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update
- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: |
opam pin -n .
opam install . --deps-only
opam exec -- dune build --profile release
- uses: actions/upload-artifact@v3
with:
name: hallowdale-${{ matrix.os }}
path: _build/default/bin/main.exe
package-artifacts:
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: ./dist/
- run: >
zip -r $OUT_FILE . \
--exclude ".git/*" \
"_build/*" \
"saves/*.json" \
assets/tiled/hallowdale.tiled-session \
config/key_overrides.json \
config/button_overrides.json
- uses: actions/upload-artifact@v3
with:
name: hallowdale
path: ${{ env.OUT_FILE }}