Skip to content

Merge pull request #16 from RaviDasari/copilot/upgrade-nodes-and-libr… #27

Merge pull request #16 from RaviDasari/copilot/upgrade-nodes-and-libr…

Merge pull request #16 from RaviDasari/copilot/upgrade-nodes-and-libr… #27

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Test & Deploy
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Setup & Build
run: |
npm ci --legacy-peer-deps
npm run clean
npm run build-ci
- name: Test
run: |
npm test
publish-npm:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: Setup, Build & Release
run: |
npm ci --legacy-peer-deps
rm -rf dist
npm run build-ci
ls #see where the buil files are
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
npm run release
git push --follow-tags origin master
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{secrets.GITHUB_TOKEN}}
force: true
- name: Publish
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}