From 16985d1fb7e8979133852cf98ed842f34b8e2626 Mon Sep 17 00:00:00 2001 From: Patrick Mowrer Date: Wed, 10 Jan 2024 21:39:20 -0500 Subject: [PATCH] chore(actions): Run `semantic-release-github-pr` in new releasePreview job --- .github/workflows/node.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 6cb07e1..f9e80c2 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -18,6 +18,7 @@ jobs: - name: Install dependencies run: yarn --immutable - run: yarn test + release: runs-on: ubuntu-latest permissions: @@ -30,9 +31,24 @@ jobs: with: node-version: '18.x' cache: 'yarn' - - run: npx semantic-release-github-pr --debug - name: Release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: npx semantic-release --debug + + releasePreview: + runs-on: ubuntu-latest + needs: test + if: github.event_name == 'pull_request' + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + cache: 'yarn' + - name: Release Preview + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: npx semantic-release-github-pr --debug \ No newline at end of file