CI: test, build & publish npm package π #1
Workflow file for this run
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: build & publish to npm | |
on: | |
push: | |
branches: | |
- debug-ci # todo: remove | |
schedule: | |
# on day-of-month 17 at 20:00 | |
- cron: '0 20 17 * *' | |
jobs: | |
test-build-publish: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ['16'] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup Node v${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install | |
- run: npm run build | |
- run: npm test | |
- name: npm login | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
run: npm login | |
- name: bump version | |
run: npm version --no-git-tag-version --force "$(npm exec@2 -- semver -i minor "$(npm info email-providers version)")" | |
- name: publish | |
run: npm publish |