From 394bb93ce9badc787ac42f4145c1853254bce40a Mon Sep 17 00:00:00 2001 From: Jamie Danielson Date: Mon, 29 Apr 2024 08:19:41 -0400 Subject: [PATCH] ci: only publish after releases are created (#2160) * ci: only publish after releases are created * clarify terms, checkout if any release is created * Update .github/workflows/release-please.yml * Update .github/workflows/release-please.yml --------- Co-authored-by: Marc Pichler --- .github/workflows/release-please.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 1c58cefc06..18a14e5130 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -54,11 +54,15 @@ jobs: # get main again - name: Checkout Repository + # only checkout if a release has been created + if: ${{ steps.release.outputs.releases_created }} uses: actions/checkout@v4 with: fetch-depth: 0 - name: Rebuild Packages + # only rebuild if a release has been created + if: ${{ steps.release.outputs.releases_created }} run: | npm ci npm run compile @@ -67,6 +71,8 @@ jobs: # need to publish all unpublished versions to npm here # See: https://github.com/lerna/lerna/tree/main/commands/publish#bump-from-package - name: Publish to npm + # only publish if a release has been created + if: ${{ steps.release.outputs.releases_created }} env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: npx lerna publish from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes