Skip to content

Commit

Permalink
Merge pull request #24 from timmyb824/ci/ci-add-conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
timmyb824 authored Aug 22, 2023
2 parents a4379ad + 2b6c32a commit e89e6e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
poetry run semantic-release version
delimiter="$(openssl rand -hex 8)"
POETRY_VERSION=$(poetry run semantic-release version)
echo "version-output<<${delimiter}" >> "${GITHUB_OUTPUT}"
echo "${POETRY_VERSION}" >> "${GITHUB_OUTPUT}"
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
poetry run semantic-release changelog
poetry run semantic-release publish
Expand All @@ -112,6 +117,12 @@ jobs:
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Check release output and terminate if no new version
if: contains(steps.package_release.outputs.version-output, 'No release will be made,') && contains(steps.package_release.outputs.version-output, 'has already been released!')
run: |
echo "No new version to release. Ending workflow."
exit 0
- name: Publish to TestPyPI
id: test_publish
if: steps.package_release.outcome == 'success'
Expand Down

0 comments on commit e89e6e0

Please sign in to comment.