Skip to content

2.0.0-beta.0

2.0.0-beta.0 #30

Workflow file for this run

name: Publish
on:
release:
types: [published]
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
dotnet:
- 6.0.x
node-version:
- 20.x
ocaml-compiler:
- 5.0.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use .NET ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
- name: Install .NET Dependencies
run: dotnet restore ts2ocaml.sln
| dotnet tool restore
- name: Install OCaml Dependencies
run: opam install . --deps-only
- name: Build & test & publish the project
run: bash fake all
- name: Push js_of_ocaml standard library to jsoo-stdlib
if: success()
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: jsoo-stdlib
FOLDER: dist/jsoo
TAG: jsoo-stdlib-${{ github.event.release.tag_name }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build ({sha}) {msg}"
- name: NPM Publish as "latest"
if: success() && !github.event.release.prerelease
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
check-version: true
- name: NPM Publish as "beta"
if: success() && github.event.release.prerelease
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
check-version: true
tag: "beta"