From 463297e82b9f41f4db0fa4a9bf777d5963943224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D1=81=D0=B8=D0=B4=D0=BA=D0=B0=20=D0=98=D0=BB?= =?UTF-8?q?=D1=8C=D1=8F?= Date: Mon, 29 Jul 2024 16:31:27 +0300 Subject: [PATCH] ci: New CI job --- .github/workflows/build.yml | 2 +- .github/workflows/npm-publish.yml | 37 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e800f6f..3720dbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -94,4 +94,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..fe9ee1a --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,37 @@ +name: Publish to npm + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org' + + - name: Install pnpm + uses: pnpm/action-setup@v2 + with: + version: 9 + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Update CHANGELOG + run: npx conventional-changelog-cli -p angular -i CHANGELOG.md -s + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: pnpm publish --no-git-checks