From 9efc61d8ebe445c42f64bf60ace56d9f3f7f259d Mon Sep 17 00:00:00 2001 From: itsMapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com> Date: Fri, 22 Jul 2022 21:44:48 -0500 Subject: [PATCH] update release workflow for pnpm --- .github/workflows/release.yml | 39 ++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fcb1d87..3baa2ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,39 +1,44 @@ -# https://github.com/changesets/action#with-publishing -name: Release +# https://pnpm.io/using-changesets +name: release on: push: branches: - main -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +env: + CI: true + PNPM_CACHE_FOLDER: .pnpm-store jobs: - release: - name: Release + version: + timeout-minutes: 15 runs-on: ubuntu-latest steps: - - name: Checkout Repo + - name: checkout code repository uses: actions/checkout@v2 - - name: Setup Node.js + - name: setup node.js uses: actions/setup-node@v2 with: - node-version: 16.x + node-version: 16 - - name: Install pnpm - run: npm install -g pnpm + - name: install pnpm + run: npm install pnpm -g - - name: Install Dependencies - run: pnpm install --frozen-lockfile + - name: setup .npmrc + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc - - name: Create Release Pull Request or Publish to npm - id: changesets + - name: setup pnpm config + run: pnpm config set store-dir $PNPM_CACHE_FOLDER + + - name: install dependencies + run: pnpm install + + - name: create and publish versions uses: changesets/action@v1 with: - publish: pnpm run release + publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}