From 3e4df4d46237d7890fc79406c3758c508239c521 Mon Sep 17 00:00:00 2001 From: devsheva Date: Wed, 4 Sep 2024 17:57:16 +0200 Subject: [PATCH 1/2] feat: add release workflow to publish on npm --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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..c7ffbfa --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.3 + with: + node-version-file: '.tool-versions' + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: Publish + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From ded6121970063792b66f6a652daef608ba47d5be Mon Sep 17 00:00:00 2001 From: devsheva Date: Wed, 4 Sep 2024 17:58:42 +0200 Subject: [PATCH 2/2] ci(release): add missing build step --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7ffbfa..3cbd565 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,8 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install + - name: Build + run: pnpm build - name: Publish run: npm publish env: