add npm publish workflow (v* tags, NPM_TOKEN)
This commit is contained in:
32
.gitea/workflows/publish.yml
Normal file
32
.gitea/workflows/publish.yml
Normal 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
|
||||
Reference in New Issue
Block a user