Skip to content

Sync'd docfd.opam

Sync'd docfd.opam #30

Workflow file for this run

name: Deploy on release
on:
push:
tags:
- "[0-9]*"
- "test*"
branches:
- "ci-test"
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
ocaml-compiler:
- "5.2"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: echo "GITHUB_TAG=$(git describe --always --tags)" >> $GITHUB_ENV
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: echo "OS_SHORT_NAME=linux" >> $GITHUB_ENV
- if: ${{ startsWith(matrix.os, 'macos') }}
run: echo "OS_SHORT_NAME=macos" >> $GITHUB_ENV
- if: ${{ startsWith(matrix.os, 'windows') }}
run: echo "OS_SHORT_NAME=windows" >> $GITHUB_ENV
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- run: opam install --with-test --locked .
- run: opam exec -- make tests
- name: Create build
if: ${{ env.OS_SHORT_NAME == 'macos' }}
run: |
opam exec -- make release-build
- name: Create static build
if: ${{ env.OS_SHORT_NAME == 'ubuntu' || env.OS_SHORT_NAME == 'windows' }}
run: |
opam exec -- make release-static-build
- name: Package into tar.gz
run: |
mv release/docfd docfd
tar -cvzf docfd-${{ env.GITHUB_TAG }}-${{ env.OS_SHORT_NAME }}.tar.gz docfd
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
docfd-${{ env.GITHUB_TAG }}-${{ env.OS_SHORT_NAME }}.tar.gz