Skip to content

Agrega CancellationStatus verifying (#85) #17

Agrega CancellationStatus verifying (#85)

Agrega CancellationStatus verifying (#85) #17

Workflow file for this run

name: Deploy to npm
on:
push:
branches:
- main
permissions:
id-token: write # Required for OIDC authentication
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "24"
registry-url: "https://registry.npmjs.org/"
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Check if version exists
id: check-version
run: |
if npm view $(node -p "require('./package.json').name")@$(node -p "require('./package.json').version") > /dev/null 2>&1; then
echo "exists=true" >> $GITHUB_ENV
else
echo "exists=false" >> $GITHUB_ENV
fi
- name: Publish to npm
if: env.exists == 'false'
run: npm publish