Skip to content

Commit

Permalink
Automatically inject new release version on publish.
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowmoose committed May 28, 2022
1 parent c824112 commit 955991e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Inject release tag version
run: sed -i "s/INJECTED_PYDERMAN_VERSION/${{ github.event.release.tag_name }}/" setup.cfg

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 0 additions & 2 deletions pyderman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
from pyderman.drivers import all_drivers, chrome, edge, firefox, opera, phantomjs
from pyderman.util import downloader

__version__ = "3.2.1"

_versions = sorted(["32", "64"], key=lambda _v: not platform.machine().endswith(_v))
_os_opts = [("win", "win", ".exe"), ("darwin", "mac", ""), ("linux", "linux", "")]

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pyderman
version = attr: pyderman.__version__
version = INJECTED_PYDERMAN_VERSION
description = Installs the latest Chrome/Firefox/Opera/PhantomJS/Edge web drivers automatically.
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down

0 comments on commit 955991e

Please sign in to comment.