Skip to content

release v0.0.10

release v0.0.10 #25

Workflow file for this run

name: Build and Package Artifacts
on:
push:
tags:
- 'v[0-1].[0-9]+.[0-9]+'
jobs:
build-artifacts:
strategy:
fail-fast: false
matrix:
os:
- macos
- ubuntu
- windows
ocaml-compiler:
- 5.1.0
runs-on: ${{ matrix.os }}-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: apt-get update
if: matrix.os == 'ubuntu'
run: |
sudo apt-get update
- name: set up ocaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: set up opam
run: |
opam pin -n .
opam install . --deps-only
- name: dune build
run: |
opam exec -- dune build --profile release
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-hallowdale-${{ github.ref_name }}
path: _build/default/bin/main.exe
package-artifacts:
env:
OUT_DIR: hallowdale-${{ github.ref_name }}
needs: build-artifacts
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: download artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: move artifacts into ${{ env.OUT_DIR }}/dist
run: |
mkdir -p $OUT_DIR/dist/
mv artifacts/windows-$OUT_DIR/main.exe $OUT_DIR/dist/windows.exe
mv artifacts/ubuntu-$OUT_DIR/main.exe $OUT_DIR/dist/linux
mv artifacts/macos-$OUT_DIR/main.exe $OUT_DIR/dist/macos
sudo chmod a+x $OUT_DIR/dist/linux $OUT_DIR/dist/macos
- name: copy everything else into ${{ env.OUT_DIR }}/
run: |
mkdir $OUT_DIR/saves
cp -r assets $OUT_DIR
rm -rf $OUT_DIR/assets/tiled/hk-reference
cp -r config $OUT_DIR
cp -r LICENSE.md $OUT_DIR
cp -r README.md $OUT_DIR
cp -r CHANGELOG.md $OUT_DIR
- name: make ${{ env.OUT_DIR }}.tar.gz
run: |
tar -czvf $OUT_DIR.tar.gz $OUT_DIR
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.OUT_DIR }}
path: ${{ env.OUT_DIR }}.tar.gz