Skip to content

Commit

Permalink
Update _reusable-package-release.yml to perform a `semantic-release…
Browse files Browse the repository at this point in the history
… --noop` (#301)

* feat: Add step in package-release workflow to perform a noop with Python Semantic Release to check on what would happen if the release process continued

* refactor: Append information to the job summary about the semantic-release --noop command
  • Loading branch information
nfelt14 authored Jan 3, 2025
1 parent 1a5be13 commit f4c547d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/_reusable-package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ jobs:
release-level: ${{ inputs.release-level }}
previous-changelog-filepath: ${{ inputs.previous-changelog-filepath }}
previous-release-notes-filepath: ${{ inputs.previous-release-notes-filepath }}
- name: Python Semantic Release (noop for preview)
uses: python-semantic-release/python-semantic-release@fd8c509df1f16daf3f71a9a6fac49247017017b2 # v9.9.0
with:
force: ${{ inputs.release-level }}
root_options: --verbose --strict --noop
- name: Add note to summary
run: |
echo "## Python Semantic Release Preview (noop)" >> "$GITHUB_STEP_SUMMARY"
echo "See the stdout from the \`Python Semantic Release (noop for preview)\` step in the \`print-inputs\` job for more details." >> "$GITHUB_STEP_SUMMARY"
outputs:
found-changes: ${{ (steps.find-changes-local.outputs.found-changes && fromJSON(steps.find-changes-local.outputs.found-changes)) || (steps.find-changes-public.outputs.found-changes && fromJSON(steps.find-changes-public.outputs.found-changes)) }}
# Update the package version using the python-semantic-release package (https://github.com/python-semantic-release/python-semantic-release)
Expand Down Expand Up @@ -155,7 +164,7 @@ jobs:
id: release
with:
force: ${{ inputs.release-level }}
root_options: -v --strict
root_options: --verbose --strict
github_token: ${{ secrets.checkout-token }}
git_committer_email: ${{ inputs.commit-user-email }}
git_committer_name: ${{ inputs.commit-user-name }}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Things to be included in the next release go here.

- Added GitHub annotations to the `check-api-for-breaking-changes` workflow to enable better visibility into any breaking changes detected. (see [#223](https://github.com/tektronix/python-package-ci-cd/issues/223))
- Updated the `package-release` workflow to not fail if there are no unreleased items, but instead to skip the release process. (see [#107](https://github.com/tektronix/python-package-ci-cd/issues/107))
- Updated the `package-release` workflow to perform a `semantic-release --noop` operation to check and see what would happen if the release process continued. (see [#91](https://github.com/tektronix/python-package-ci-cd/issues/91))

---

Expand Down

0 comments on commit f4c547d

Please sign in to comment.