Skip to content

Bump @types/node from 22.10.1 to 22.10.2 (#742) #1789

Bump @types/node from 22.10.1 to 22.10.2 (#742)

Bump @types/node from 22.10.1 to 22.10.2 (#742) #1789

Workflow file for this run

# This workflow will do a clean install of node dependencies, cache/restore them, 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: [main, release]
tags:
- 'beta-v*'
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
scope: '@boxyhq'
cache: 'npm'
- run: npm i
- run: npm run lint
- run: npm run check-format
- run: npm run build
- name: test
run: |
export NODE_OPTIONS=--max_old_space_size=4096
npm run test
- name: Publish NPM
if: github.ref == 'refs/heads/release' || contains(github.ref, 'refs/tags/beta-v')
run: |
publishTag="latest"
if [[ "$GITHUB_REF" == *\/release ]]
then
echo "Release branch"
else
echo "Dev branch"
npm install -g json
publishTag="beta"
json -I -f package.json -e "this.main=\"dist/index.js\""
json -I -f package.json -e "this.types=\"dist/index.d.ts\""
versionSuffixTag="-beta.${GITHUB_RUN_NUMBER}"
sed "s/\(^[ ]*\"version\"\:[ ]*\".*\)\",/\1${versionSuffixTag}\",/" < package.json > package.json.new
mv package.json.new package.json
fi
npm publish --tag $publishTag --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}