From 98d789bc2dca450fef0ac20bbe481fd91e311a22 Mon Sep 17 00:00:00 2001 From: Jack Hadrill Date: Wed, 3 Sep 2025 20:44:51 +0100 Subject: [PATCH] Update CI workflow and package configuration for Gitea npm registry --- .gitea/workflows/ci.yml | 25 +++++++++++++++++++++++++ package.json | 7 +++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cf04a45..2ebe995 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: push: branches: [master] + tags: ["v*"] pull_request: branches: [master] @@ -26,3 +27,27 @@ jobs: - name: Build project run: npm run build + + publish: + needs: build + runs-on: ubuntu-latest + container: node:lts-alpine + if: startsWith(github.ref, 'refs/tags/v') + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + run: | + npm config set registry https://git.3t.network/api/packages/3t.network/npm/ + npm config set //git.3t.network/api/packages/3t.network/npm/:_authToken ${{ secrets.PUBLISH_TOKEN }} + + - name: Install dependencies + run: npm ci + + - name: Build project + run: npm run build + + - name: Publish to Gitea npm registry + run: npm publish diff --git a/package.json b/package.json index 2d4ec39..8f5bb95 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "romulus-js", + "name": "romulus", "version": "1.0.0", "description": "An implementation of the Romulus-M cryptography specification.", "main": "dist/index.js", @@ -13,7 +13,10 @@ }, "repository": { "type": "git", - "url": "https://git.jacknet.io/TerribleCodeClub/romulus-js" + "url": "https://git.3t.network/3t.network/romulus-js" + }, + "publishConfig": { + "registry": "https://git.3t.network/api/packages/3t.network/npm/" }, "author": "Butlersaurus", "license": "ISC",