Skip to content

Commit

Permalink
ci: only publish after releases are created (#2160)
Browse files Browse the repository at this point in the history
* 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 <marc.pichler@dynatrace.com>
  • Loading branch information
JamieDanielson and pichlermarc committed Apr 29, 2024
1 parent eb6e8ef commit 394bb93
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release-please.yml
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 394bb93

Please sign in to comment.