Skip to content

Update deps

Update deps #5

Workflow file for this run

name: Publish NPM Package to GitHub Packages and npm
on:
push:
branches:
- ci
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Build Plugin
run: npm run build
- name: Authenticate with GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{secrets.PUBLISH_GITHUB_TOKEN}}" > ~/.npmrc
echo "registry=https://npm.pkg.github.com" >> ~/.npmrc
- name: Test publish to GitHub Packages
if: github.ref == 'refs/heads/ci'
run: |
echo "Testing publish to GitHub Packages..."
npm publish --dry-run --registry=https://npm.pkg.github.com
- name: Publish to GitHub Packages
if: startsWith(github.ref, 'refs/tags/v')
run: npm publish --registry=https://npm.pkg.github.com
- name: Authenticate with npm
run: |
echo "//registry.npmjs.org/:_authToken=${{secrets.PUBLISH_NPM_TOKEN}}" >> ~/.npmrc
- name: Test publish to npm registry
if: github.ref == 'refs/heads/ci'
run: |
echo "Testing publish to npm registry..."
npm publish --dry-run --registry=https://registry.npmjs.org
- name: Publish to npm registry
if: startsWith(github.ref, 'refs/tags/v')
run: npm publish --registry=https://registry.npmjs.org