Update Version and Publish to NPM #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: Update Version and Publish to GitHub Packages | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish-github-packages: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Setup git user | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
- name: Update package.json version | |
run: npm version --tag=latest ${{ github.event.release.tag_name }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build SDK | |
run: npm run build | |
- name: Publish to GitHub Packages | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} |