Merge pull request #62 from moccu/dependabot/npm_and_yarn/dependencie… #97
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 | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup 🔌 | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies 👨🏻💻 | |
run: npm ci | |
- name: Run tests 🧪 | |
run: npm t | |
- name: Publish 🚀 | |
if: startsWith(github.ref, 'refs/tags/') | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | |
- name: Publish to GitHub 🚀 | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
npm set //npm.pkg.github.com/:_authToken $GITHUB_TOKEN | |
npm publish --access public --@moccu:registry=https://npm.pkg.github.com | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |