AAP Chatbot - Publish #7
This file contains hidden or 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: AAP Chatbot - Publish | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| WORKING_DIRECTORY: ./aap_chatbot | |
| steps: | |
| - name: Checkout commit | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| cache-dependency-path: ${{env.WORKING_DIRECTORY}}/package-lock.json | |
| - name: Install Dependencies & Test env | |
| run: npm install && npx playwright install | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| - name: Compile | |
| run: npm run build | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| - name: Test | |
| run: npm run test | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| - name: Run linter | |
| run: npm run eslint | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| - name: Pack | |
| run: npm pack | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| - name: Publish to npmjs | |
| run: npm publish --access public | |
| working-directory: ${{env.WORKING_DIRECTORY}} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |