Files
bitcoin-logo/.gitea/workflows/npm-publish.yaml
Grzegorz Kucmierz 60490cd2a1
All checks were successful
Deploy to Production / deploy (push) Successful in 4s
fix: use local .npmrc and add token presence check
2026-03-03 09:42:25 +00:00

30 lines
707 B
YAML

name: npm-publish
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- name: Publish to npm
run: |
if [ -z "${NPM_TOKEN}" ]; then
echo "ERROR: NPM_TOKEN is empty! Check your Gitea Secrets."
exit 1
fi
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}