Skip to content

chore(deps-dev): bump the dev-dependencies group across 1 directory w… #792

chore(deps-dev): bump the dev-dependencies group across 1 directory w…

chore(deps-dev): bump the dev-dependencies group across 1 directory w… #792

Workflow file for this run

name: Node.js CI
permissions:
contents: read
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Submodules
run: git submodule update --init --recursive
- name: Setup Node.js
uses: volta-cli/action@v5
- name: Install dependencies
run: npm ci --no-audit
- name: Generate code
run: npm run codegen
- name: Run linting
run: npm run lint --if-present
- name: Check code formatting
run: npm run prettier:check --if-present
- name: Build project
run: npm run build:release
- name: Run unit tests
run: npm run test:unit
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: build-dist
path: |
dist/
package.json
package-lock.json
README.md
LICENSE
retention-days: 30
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: unit-test-results
path: |
**/*test-results*
**/*coverage*
retention-days: 7
publish-pr:
if: >-
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: build-dist
path: ./package
- name: Setup Node.js for GitHub Packages
uses: actions/setup-node@v6
with:
node-version: "22"
registry-url: "https://npm.pkg.github.com"
scope: "@crispthinking"
- name: Set pre-release version
working-directory: ./package
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
SHORT_SHA=${GITHUB_SHA::7}
VERSION="0.0.0-pr.${PR_NUMBER}.${SHORT_SHA}"
npm --no-git-tag-version version "$VERSION"
- name: Publish pre-release package
working-directory: ./package
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_TAG="pr-${{ github.event.pull_request.number }}"
npm publish --tag "$PR_TAG"