Skip to content

Core Modules NPM publish #6

Core Modules NPM publish

Core Modules NPM publish #6

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Core Modules NPM publish
on:
workflow_dispatch:
inputs:
module:
description: 'The core module you wish to publish: cookie | document | loadScript | objectAssign | promise | query-string | window'
required: true
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Check Core Module Name
if: ${{ github.event.inputs.module != 'cookie' && github.event.inputs.module != 'document' && github.event.inputs.module != 'loadScript' && github.event.inputs.module != 'objectAssign' && github.event.inputs.module != 'promise' && github.event.inputs.module != 'query-string' && github.event.inputs.module != 'window' }}
run: |
echo 'Only the modules "cookie", "document", "loadScript", "objectAssign", "promise", "query-string" and "window" are supported. You entered "${{ github.event.inputs.module }}"'
exit 1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install core module dependencies
working-directory: ./coreModulePackages/${{ github.event.inputs.module }}
run: npm ci
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
package: ./coreModulePackages/${{ github.event.inputs.module }}