From ae138a98eac5d1cf94d78550e71df8f1708e55cb Mon Sep 17 00:00:00 2001 From: Tiphaine Date: Mon, 22 Jul 2024 08:06:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b01f71e..c4777f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,16 +63,19 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create Release Pull Request and Publish - id: changesets-production + - name: Publish to npm + if: github.event.inputs.target == 'npm' uses: changesets/action@v1 with: - publish: | - if [ "${{ github.event.inputs.target }}" == "npm" ]; then - pnpm release - else - pnpm release --registry=https://npm.pkg.github.com/ - fi + publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish to GitHub Packages + if: github.event.inputs.target == 'github' + uses: changesets/action@v1 + with: + publish: pnpm release --registry=https://npm.pkg.github.com/ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}