From 4a24ff6b5daa02b36c987c472cf160942d21e17e Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 23 Jul 2025 12:50:46 -0300 Subject: [PATCH] chore: Adds release workflow file --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 -- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..3769c60 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Release + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "22" + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: | + corepack enable + corepack prepare --activate + pnpm install + + - name: Build package + run: pnpm build + + - name: Publish to npm + run: pnpm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8dcba6e..1eb1a2e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,8 +4,6 @@ on: pull_request: branches: - main - release: - types: [created] jobs: test: