Skip to content

Updating gh workflow #25

Updating gh workflow

Updating gh workflow #25

Workflow file for this run

name: Deploy on release: Linux

Check failure on line 1 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax
on:
push:
tags:
- "[0-9]*"
- "test*"
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-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 --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