From b1a1b3f898aba545c87242990b269be857f35dc6 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 10 May 2024 09:04:23 +0900 Subject: [PATCH] Update GitHub Actions workflow Signed-off-by: Sora Morimoto --- .github/workflows/ci.yml | 56 ++++++++++++++--------------------- .github/workflows/publish.yml | 35 ++++++++-------------- 2 files changed, 36 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e28a3ea..60e1e5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,13 @@ name: CI on: push: - branches: [main,v2] + branches: + - main + - v2 pull_request: - branches: [main,v2] + branches: + - main + - v2 workflow_dispatch: jobs: @@ -12,40 +16,36 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-latest - dotnet: - - 6.0.x - node-version: - - 20.x ocaml-compiler: - - 4.08.x - - 4.12.x - - 4.14.x - - 5.0.x + - "4.08" + - "4.12" + - "4.14" + - "5.0" + - "5.1" - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use .NET ${{ matrix.dotnet }} + - name: Set-up .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: 6.0.x - - name: Use Node.js ${{ matrix.node-version }} + - name: Set-up Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 22 cache: yarn - - name: Use OCaml ${{ matrix.ocaml-compiler }} + - name: Set-up OCaml uses: ocaml/setup-ocaml@v2 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} dune-cache: true + allow-prerelease-opam: true - name: Install .NET Dependencies run: | @@ -59,31 +59,21 @@ jobs: run: bash fake TestJsoo build-res: - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - dotnet: - - 6.0.x - node-version: - - 20.x - - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use .NET ${{ matrix.dotnet }} + - name: Set-up .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: 6.0.x - - name: Use Node.js ${{ matrix.node-version }} + - name: Set-up Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 22 cache: yarn - name: Install .NET Dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e7c7bcd..912f35f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,48 +2,39 @@ name: Publish on: release: - types: [published] + 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 }} + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Use .NET ${{ matrix.dotnet }} + - name: Set-up .NET uses: actions/setup-dotnet@v4 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: 6.0.x - - name: Use Node.js ${{ matrix.node-version }} + - name: Set-up Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 22 cache: yarn - - name: Use OCaml ${{ matrix.ocaml-compiler }} + - name: Set-up OCaml uses: ocaml/setup-ocaml@v2 with: - ocaml-compiler: ${{ matrix.ocaml-compiler }} + ocaml-compiler: "5.1" dune-cache: true + allow-prerelease-opam: true - name: Install .NET Dependencies - run: dotnet restore ts2ocaml.sln - | dotnet tool restore + run: | + dotnet restore ts2ocaml.sln + dotnet tool restore - name: Install OCaml Dependencies run: opam install . --deps-only