Skip to content

esbuild Compilation & npm Publish Workflow #5

esbuild Compilation & npm Publish Workflow

esbuild Compilation & npm Publish Workflow #5

name: esbuild Compilation & npm Publish Workflow
on:
workflow_dispatch:
inputs:
branch:
description: 'Set the branch to use for automation tests'
type: string
required: false
default: 'main'
nodeVersion:
description: version of node to use. It's better to specify latest, lts/* or lts/-1 than to hardode numbers
type: string
default: lts/*
required: false
jobs:
bundle:
uses: ./.github/workflows/bundle.yml
secrets: inherit
with:
branch: ${{ inputs.branch }}
nodeVersion: ${{ inputs.nodeVersion }}
publish:
needs: bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Publish a Package
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}