From ed4bbf232717838e38b009fd17c39f42401189bb Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Wed, 18 Mar 2026 21:01:22 +0000 Subject: [PATCH] Add auto-publishing --- .gitea/workflows/publish.yaml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .gitea/workflows/publish.yaml diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml new file mode 100644 index 0000000..612eaaa --- /dev/null +++ b/.gitea/workflows/publish.yaml @@ -0,0 +1,38 @@ +name: Publish Package + +on: + push: + tags: + - "v*" + +jobs: + build-and-publish: + runs-on: ubuntu-22.04 + container: + image: ghcr.io/catthehacker/ubuntu:act-latest + + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: npm ci + + - name: Build + run: npm run build + + # - name: Publish to NPM + # run: npm publish --access public + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish to Gitea Repo + run: npm publish --registry=https://git.fjla.uk + env: + NODE_AUTH_TOKEN: ${{ secrets.REPO_TOKEN }} \ No newline at end of file