From 204dceeff72be79e014ea0fff111ea1e8692cf33 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Thu, 25 Dec 2025 16:05:02 -0600 Subject: [PATCH] Add workflow for publishing NPM packages, including setup for Node.js, dependency installation, packaging, and publishing to a custom registry. --- .gitea/workflows/npm-publish.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .gitea/workflows/npm-publish.yml diff --git a/.gitea/workflows/npm-publish.yml b/.gitea/workflows/npm-publish.yml new file mode 100644 index 0000000..2a0c9be --- /dev/null +++ b/.gitea/workflows/npm-publish.yml @@ -0,0 +1,36 @@ +name: Publish NPM Package + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install dependencies + run: npm ci --registry=https://registry.npmjs.org/ + + - name: Package + run: make package + + - name: Configure npm for publishing + uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: 'https://git.quad4.io/api/packages/quad4-software/npm/' + + - name: Publish + run: npm publish + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}