Files
bitcoin-logo/.gitea/workflows/npm-publish.yaml
Grzegorz Kucmierz 0041f18eab
All checks were successful
Deploy to Production / deploy (push) Successful in 5s
diag: add npm whoami to troubleshoot authentication
2026-03-03 09:45:39 +00:00

33 lines
767 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
echo "Checking identity..."
npm whoami
npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}