NPM publish #16
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: NPM publish | |
on: workflow_dispatch | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install dependencies | |
run: npm ci | |
- name: Create .env file | |
run: | | |
touch .env | |
echo TRELLO_API_KEY=${{ secrets.TRELLO_API_KEY }} >> .env | |
echo TRELLO_API_TOKEN=${{ secrets.TRELLO_API_TOKEN }} >> .env | |
- name: Building sources | |
run: npm run build | |
- name: Tests | |
run: npm run test | |
- name: Linting | |
run: npm run lint | |
env: | |
CI: true | |
- name: Publishing | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |