Publish Package #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package | |
on: | |
workflow_dispatch: | |
inputs: | |
package: | |
type: choice | |
description: 'Package to publish' | |
required: true | |
options: | |
- const | |
- entities | |
- expresso | |
- log4bot | |
- opapi | |
- promex | |
- ptb-schema | |
- readiness | |
- trail | |
- tunnel | |
- verel | |
- yargs-extra | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
publish-package: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 8 | |
- name: Install And Build | |
working-directory: './${{ inputs.package }}' | |
run: | | |
if [ -f yarn.lock ]; then | |
yarn install | |
yarn build | |
elif [ -f pnpm-lock.yaml ]; then | |
pnpm install | |
pnpm build | |
else | |
npm install | |
npm run build | |
fi | |
- name: Publish | |
uses: botpress/gh-actions/publish-if-not-exists@master | |
with: | |
path: './${{ github.event.inputs.package }}' | |
token: '${{ secrets.NPM_ACCESS_TOKEN }}' |