From 507990f68df77c392c7104731cc6cd78ac652676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksandras=20=C5=A0ukelovi=C4=8D?= Date: Fri, 23 Feb 2024 17:27:56 +0200 Subject: [PATCH] Added release.yml action --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..e73fef3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +name: Release + +on: + push: + branches: + - main + workflow_dispatch: + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Use Node 20 + uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install pnpm 8.x.x + uses: pnpm/action-setup@v2.2.4 + with: + version: 8.x.x + + - name: Install pnpm dependencies (with cache) + uses: covbot/pnpm-install-with-cache@v1 + + - name: Creating .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_BOT_TOKEN }} + + - name: Create Release Pull Request or Publish to npm + uses: changesets/action@v1 + with: + version: pnpm bump + publish: pnpm release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}