From 404b0518c21387cf01fba945537572ddc976a2f2 Mon Sep 17 00:00:00 2001 From: Igor Bogdanovic <30838760+IgorBogdanovic@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:36:50 +0100 Subject: [PATCH] chore: Add ci-publish workflow --- .github/workflows/ci-publish.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci-publish.yml diff --git a/.github/workflows/ci-publish.yml b/.github/workflows/ci-publish.yml new file mode 100644 index 0000000..9d5618c --- /dev/null +++ b/.github/workflows/ci-publish.yml @@ -0,0 +1,36 @@ +name: Publish to npm + +on: + push: + tags: + - "v*.*.*" + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + # Checkout the code + - name: Checkout repository + uses: actions/checkout@v3 + + # Set up Node.js + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "yarn" + + # Install dependencies + - name: Install dependencies + run: yarn install + + # Build the project + - name: Build the project + run: yarn build + + # Publish to npm + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}