Skip to content

Update package.json for new release #29

Update package.json for new release

Update package.json for new release #29

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
permissions:
contents: write
pull-requests: write
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 build files are
- name: Create Release PR
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
npx release-please release-pr --repo-url=https://github.com/RaviDasari/see-image-diff --token=${{ secrets.GITHUB_TOKEN }}
- name: Publish
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}