Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: correct step output key in readme #1057

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,19 @@ jobs:
- uses: actions/checkout@v2
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@willarmiros willarmiros Sep 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we were both mistaken - it looks like releases_created is actually set as output when there is any release: https://github.com/google-github-actions/release-please-action/blob/973b63d3d58b9a5a9fed0dd512501ad5a9ab319b/index.js#L49

Whereas release_created wasn't removed as I initially thought, but is only set if you are releasing a package at the root of the repo(?) Regardless, IMO it would be more correct to use the output that is always set in the example code to cover more use cases.

- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
# if you are using Yarn, substitute the command below with `yarn install --frozen-lockfile`
- run: npm ci
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
if: ${{ steps.release.outputs.releases_created }}
```

> So that you can keep 2FA enabled for npm publications, we recommend setting
Expand Down