Skip to content

Commit

Permalink
Per-9644 cicd fix pypi url (#639)
Browse files Browse the repository at this point in the history
* 0.7.11

* 0.7.11 wip1

* wip2

* wip3

* version as a placeholder

* pre commit fix

* wip2
  • Loading branch information
EliMoshkovich committed Aug 7, 2024
1 parent a3e7785 commit 0d7a39e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
release:
# job will automatically run after a new "release" is create on github.
types: [published]
#Allows you to run this workflow manually from the Actions tab

jobs:
# this job will build, test and (potentially) push the docker images to docker hub
Expand Down Expand Up @@ -166,13 +165,10 @@ jobs:
- name: Bump version - packaging__.py
run: |
version_tag=${{ github.event.release.tag_name }}
version_tag=${version_tag#v} # Remove the leading 'v'
version_tuple=$(echo $version_tag | sed 's/\./, /g')
sed -i "s/VERSION = (.*/VERSION = (${version_tuple})/" packages/__packaging__.py
cat packages/__packaging__.py
git config --local user.email "[email protected]"
git config --local user.name "elimoshkovich"
git add packages/__packaging__.py
git commit -m "Bump version to ${version_tag}"
- name: Cleanup setup.py and Build every sub-packages
run: |
Expand Down Expand Up @@ -208,7 +204,7 @@ jobs:
# repository-url: https://test.pypi.org/legacy/
env:
name: pypi
url: https://pypi.org/p/opal-common
url: https://pypi.org/p/opal-common/

- name: Publish package distributions to PyPI - Opal-Client
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -220,7 +216,7 @@ jobs:
# repository-url: https://test.pypi.org/legacy/
env:
name: pypi
url: https://pypi.org/p/opal-client
url: https://pypi.org/p/opal-client/

- name: Publish package distributions to PyPI - Opal-Server
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -232,10 +228,4 @@ jobs:
# repository-url: https://test.pypi.org/legacy/
env:
name: pypi
url: https://pypi.org/p/opal-server

- name: Push changes of packages/__packaging__.py to GitHub
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN_GITHUB }}
branch: master
url: https://pypi.org/p/opal-server/
4 changes: 2 additions & 2 deletions packages/__packaging__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"""

import os

VERSION = (0, 7, 10)
# VERSION is a placeholder, the real version is set by the release CI/CD pipeline
VERSION = (0, 0, 0)
VERSION_STRING = ".".join(map(str, VERSION))

__version__ = VERSION_STRING
Expand Down

0 comments on commit 0d7a39e

Please sign in to comment.