You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
publish-action/.github/workflows/Publish.yml

33 lines
668 B
YAML

name: 🚀 Publish to npm Registry
on:
push:
branches:
- main
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build || echo "No build step"
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}