Skip to content

Bump hume dependency to 0.15.12 (#404) #51

Bump hume dependency to 0.15.12 (#404)

Bump hume dependency to 0.15.12 (#404) #51

Workflow file for this run

name: ci
on:
# Run workflow when a PR is merged onto main
push:
tags:
- 'v*.*.*'
branches:
- main
# Run workflow on any open PR against main branch
pull_request:
types: ['opened', 'reopened', 'ready_for_review', 'synchronize']
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
pr-check:
if: ${{ github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
env:
NODE_ENV: development
steps:
# Checkout repository files
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
# Add Node.js and npm to runner
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
# Install project dependencies with pnpm
- name: Install dependencies
env:
# Note: NODE_ENV needs to be set to development to
# install jest and other dev dependencies
NODE_ENV: development
run: pnpm install
# Check that packages can build without errors
- name: Builds without errors
env:
NODE_ENV: production
run: pnpm build
# Check for linting errors
- name: Check for linting errors
run: pnpm lint
# Check that project unit tests are successful
- name: Run unit tests
run: pnpm test
publish:
needs: pr-check
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "18.18.0"
- name: Setup pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
cd packages
for package in $(ls); do
pushd $package
if [[ ${GITHUB_REF} == *alpha* ]]; then
npm publish --access public --tag alpha
elif [[ ${GITHUB_REF} == *beta* ]]; then
npm publish --access public --tag beta
else
npm publish --access public --tag latest
fi
popd
done
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}