add npm publish workflow (v* tags, NPM_TOKEN)

This commit is contained in:
mikefreno
2026-08-12 19:41:06 -04:00
parent 39740cdc3e
commit 3a903bd74d

View File

@@ -0,0 +1,32 @@
name: publish
# Publish this omp port package to the npm registry on version tags.
#
# Prerequisites:
# - npm automation token (publish scope) stored as the repo secret NPM_TOKEN
# - package name claimed on npm (@mikefreno/omp-<name>)
#
# Manual publish: Actions tab → Run workflow (workflow_dispatch).
on:
push:
tags: ['v*']
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node (npm registry auth)
uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public --ignore-scripts