From bedbd018073d2c0569102ff40e458a3a094a945d Mon Sep 17 00:00:00 2001 From: p-sw Date: Sun, 17 May 2026 15:42:48 +0900 Subject: [PATCH] ci: add publish workflow --- .gitea/workflows/publish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..00cfaf1 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Publish + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + container: + image: oven/bun:1 + steps: + - name: Checkout + uses: https://gitea.com/actions/checkout@v6.0.2 + - name: Install dependencies + run: bun install --frozen-lockfile + - name: Test + run: bun run test + - name: Typecheck + run: bun run check + - name: Build + run: bun run build + - name: Publish to npm + run: | + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc + bun publish --access public + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}