Skip to content

adding /{stage} to apis #125

adding /{stage} to apis

adding /{stage} to apis #125

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: NPM Version
run: |
npm --no-git-tag-version version 4.0.${{ github.run_number }}
echo "## NPM Version" >> $GITHUB_STEP_SUMMARY
echo "\`npm install -S @hexlabs/[email protected].${{ github.run_number }}\`" >> $GITHUB_STEP_SUMMARY
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Production Build
run: npm run build
- name: Test
run: npm test
- name: Package
run: npm pack
- name: Authenticate with NPM registry
if: github.ref == 'refs/heads/main'
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish NPM package
if: github.ref == 'refs/heads/main'
run: npm publish --access public