fix: update to swipl v9.3.17 #2066
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- run: npm ci | |
- run: npm run lint | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- run: npm ci | |
- run: echo "CACHE_KEY=$(cat ./package.json | jq '.config | [.[]] | map(.version, .commit) | @tsv')" >> $GITHUB_ENV | |
- name: Restore cached build | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: dist/swipl | |
key: ${{ env.CACHE_KEY }} | |
- name: Full Build | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm run build | |
- name: Partial Build | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: npm run tsc | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
test: | |
needs: [ build ] | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 19.x, 20.x, 22.x] | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm ci | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- run: npm test | |
- run: npm run bundle:webpack | |
release: | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: [ test, lint ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- run: npm ci | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: "Create Bundle" | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: | | |
# The semantic-release command errors if this folder does not exist | |
mkdir ./bundle | |
version=$(npx semantic-release --dry-run | grep -oP 'The next release version is \K[0-9]+\.[0-9]+\.[0-9]+') || true | |
if [ $version ] | |
then | |
npm run bundle:webpack -- --name=v$version | |
npm run bundle:latest -- --name=v$version | |
fi | |
- name: Release | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
run: npx semantic-release |