Skip to content

Commit

Permalink
💚 chore(cd): Fix logic for publish package according to tag
Browse files Browse the repository at this point in the history
If there is a tag, then publish on PyPI
else (tag is empty string) patch version number and publish on TestPyPI
Down version number to have grater number in the next commit (I deleted all packages from both PyPI in advance)
  • Loading branch information
hotenov committed Aug 8, 2024
1 parent 76cfd36 commit cf65d52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.check-version.outputs.tag }}
new-version-tag: ${{ steps.check-version.outputs.tag }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
- name: Bump version for developmental release
if: steps.check-version.outputs.tag != ''
if: steps.check-version.outputs.tag == ''
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
publish-to-pypi:
name: >-
📦 to PyPI | Publish Python 🐍 distribution
if: needs.build-package-and-publish-gh-release.outputs.output1
if: needs.build-package-and-publish-gh-release.outputs.new-version-tag != ''
needs:
- build-package-and-publish-gh-release
runs-on: ubuntu-latest
Expand All @@ -105,7 +105,7 @@ jobs:

publish-to-test-pypi:
name: 📦 to 🧪TestPyPI | Publish Python 🐍 distribution
if: needs.build-package-and-publish-gh-release.outputs.output1 != ''
if: needs.build-package-and-publish-gh-release.outputs.new-version-tag == ''
needs:
- build-package-and-publish-gh-release
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "playlist-along"
version = "2024.8.8"
version = "2024.8.7"
description = "Python CLI app for M3U playlists conversion and processing"
authors = ["Artem Hotenov <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit cf65d52

Please sign in to comment.