Skip to content

build: switch to node 20, add back loader param #1168

build: switch to node 20, add back loader param

build: switch to node 20, add back loader param #1168

Workflow file for this run

name: Build artifact
on:
push:
branches:
- main
paths:
- '.github/actions/setup-js-env/'
- '.github/workflows/build-artifact.yml'
- 'plugin/**'
- 'package.json'
- 'util/publish.sh'
- 'util/DEPS.json5'
- 'util/fetch_deps.ts'
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- '.github/actions/setup-js-env/'
- '.github/workflows/build-artifact.yml'
- 'plugin/**'
- 'package.json'
- 'util/publish.sh'
- 'util/DEPS.json5'
- 'util/fetch_deps.ts'
workflow_dispatch:
jobs:
msbuild:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-js-env
- name: Set artifact name
shell: bash
run: |
sha=$(echo ${{ github.sha }} | cut -c 1-8)
echo "artifact_sha=$sha" >> $GITHUB_ENV
- name: Check dependencies cache
id: cache-dependencies
uses: actions/cache@v3
with:
path: ./plugin/ThirdParty
key: ${{ runner.os }}-cactbot-${{ hashFiles('./util/fetch_deps.ts', './util/DEPS.json5') }}
restore-keys: |
${{ runner.os }}-cactbot-
- name: Fetch dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
npm run fetch-deps
- name: Set up msbuild
uses: microsoft/setup-msbuild@v1
- name: Add Custom Problem Matcher
run: |
echo "::add-matcher::.github/matchers/${{ github.job }}.json"
- name: MSBuild
run: msbuild /p:Configuration=Release /p:Platform=x64 plugin/Cactbot.sln
shell: cmd
- name: Build JavaScript UI Module Bundles
run: npm run build
timeout-minutes: 10
- name: Generate artifact
shell: bash
run: ./util/publish.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: cactbot-${{ env.artifact_sha }}
path: publish/cactbot-release/
retention-days: 30