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 }}