From cb8773d2462e12e72a132ffd17beb23b88956adb Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Mon, 8 Sep 2025 21:13:17 +0100 Subject: [PATCH] Create publish action --- .gitea/workflows/publish.yaml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index e69de29..5294d18 100644 --- a/.gitea/workflows/publish.yaml +++ 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.GITEA_REPO_TOKEN }} \ No newline at end of file