push latest version of APIs #181
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 and push APIs | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
jobs: | |
setup-build-publish-deploy: | |
name: Publish Typescript packages to NPM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
registry-url: "https://registry.npmjs.org" | |
- run: | | |
npm install | |
npm run build-index | |
npm run build | |
- run: npm version prerelease --preid=dev --no-git-tag-version | |
- name: push the new tag to GitHub | |
run: | | |
git config --global user.name 'Rig Automation' | |
git config --global user.email "rig-bot@users.noreply.github.com" | |
git add package.json | |
git commit -am "upgraded version of rig npm package [skip ci]" | |
git push | |
- run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |