From 5e19b140da89db91c0f2f87ac2b0da513d7cf1b5 Mon Sep 17 00:00:00 2001 From: mikefreno Date: Wed, 12 Aug 2026 19:41:05 -0400 Subject: [PATCH] add npm publish workflow (v* tags, NPM_TOKEN) --- .gitea/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..964f3f1 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -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-) +# +# 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