30 lines
783 B
YAML
30 lines
783 B
YAML
name: Publish npm Package
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: node-22
|
|
steps:
|
|
- name: Route Git to external Gitea URL
|
|
run: git config --global url."https://hub.kl1.tenere.ai/".insteadOf "http://gitea:3000/"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Auth for Gitea npm registry
|
|
run: |
|
|
echo "@${{ github.repository_owner }}:registry=https://hub.kl1.tenere.ai/api/packages/${{ github.repository_owner }}/npm/" > .npmrc
|
|
echo "//hub.kl1.tenere.ai/api/packages/${{ github.repository_owner }}/npm/:_authToken=${{ secrets.PACKAGE_TOKEN }}" >> .npmrc
|
|
|
|
- name: Install
|
|
run: npm install
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Publish to Gitea npm
|
|
run: npm publish
|