Skip to content

build(deps-dev): bump lodash from 4.17.21 to 4.17.23 #15

build(deps-dev): bump lodash from 4.17.21 to 4.17.23

build(deps-dev): bump lodash from 4.17.21 to 4.17.23 #15

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
release:
types: [ published ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [19.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run type checking
run: npm run type-check
- name: Generate documentation
run: npm run docs
- name: Test CLI help
run: node bin/cli.js --help
- name: Test CLI platforms
run: node bin/cli.js platforms
- name: Test CLI init (dry run)
run: node bin/cli.js init test-project --help
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run TypeScript linting
run: npm run lint:types
build:
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build types
run: npm run build:types
- name: Generate documentation
run: npm run docs
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/
- name: Upload type definitions
uses: actions/upload-artifact@v4
with:
name: types
path: |
index.d.ts
bin/cli.d.ts
publish:
runs-on: ubuntu-latest
needs: [test, lint, build]
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run pre-publish checks
run: |
npm run type-check
npm run docs
npm run build:types
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create release tarball
run: |
tar -czf node-package-builder-${{ github.event.release.tag_name }}.tar.gz \
index.js index.d.ts bin/ package.json README.md LICENSE CHANGELOG.md
- name: Upload release asset using gh CLI
run: gh release upload ${{ github.event.release.tag_name }} node-package-builder-${{ github.event.release.tag_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}