-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from timmyb824/ci/refactor-release-job
- Loading branch information
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,21 +101,33 @@ jobs: | |
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
poetry run semantic-release version | ||
OUTPUT=$(poetry run semantic-release version) | ||
echo "$OUTPUT" | ||
echo "name=RELEASE_OUTPUT" >> "$GITHUB_OUTPUT" | ||
poetry run semantic-release changelog | ||
poetry run semantic-release publish | ||
# Unable to use at the moment due to the python version used by the action | ||
# - name: Run Python Semantic Release | ||
# id: release | ||
# uses: python-semantic-release/python-semantic-release@master | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check release output and terminate if no new version | ||
shell: bash | ||
if: contains(steps.release.outputs.RELEASE_OUTPUT, 'No release will be made,') && contains(steps.release.outputs.RELEASE_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.release.outcome == 'success' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
- name: Test install from TestPyPI | ||
if: steps.test_publish.outcome == 'success' | ||
|
@@ -130,7 +142,3 @@ jobs: | |
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
if: steps.test_install.outcome == 'success' | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
repository-url: https://upload.pypi.org/legacy/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters