Release 1.0.6 #10
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: Publish to npm and GitHub | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org | |
- name: Update version | |
run: | | |
git config --global user.name "mayank1513" | |
git config --global user.email "[email protected]" | |
git fetch | |
git checkout main | |
npm version patch | |
- name: Build and Test | |
run: npm i && npm run build && npm run test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Publish to npm | |
run: npm run publish-package | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
- uses: actions/setup-node@v3 | |
with: | |
registry-url: https://npm.pkg.github.com/ | |
- name: Publish to GitHub Public Repository | |
run: npm run publish-gpr | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: push version bump back to repo | |
run: git push origin main |