diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4100fd495771d..001e2ec5aa5e2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,7 +47,8 @@ jobs: cache-key: python-nightly run: | ./go "py:version[nightly]" - ./go py:release + ./go py:build + twine upload --repository testpypi bazel-bin/py/selenium-4*.whl bazel-bin/py/selenium-4*.tar.gz secrets: inherit diff --git a/Rakefile b/Rakefile index 1521105dbfe1c..9bfb4bdbf35f1 100644 --- a/Rakefile +++ b/Rakefile @@ -629,13 +629,15 @@ namespace :py do # 1. Switching from a release build to a nightly one # 2. Updating a nightly build for the next nightly build # 3. Switching from nightlies to a release build. - # According to PEP440, the way to indicate a nightly build is `M.m.v.devN` - # Where `N` is sorted numerically. That means we can create the dev - # version number from today's date. if bump_nightly && old_version.include?('.dev') - new_version = old_version.gsub(/\d+$/, "#{Time.now.strftime("%Y%m%d%H%M")}") + # This is the case where we are updating a nightly build to the next nightly build. + # This change is usually done by the CI system and never committed. + # The ".dev" is removed to have the pushed package in TestPyPi be shown as latest. + new_version = old_version.gsub(/\.dev\d+$/, '') + + ".#{Time.now.strftime("%Y%m%d%H%M")}" elsif bump_nightly + # This is the case after a production release and the version number is configured + # to start doing nightly builds. new_version = old_version + ".dev#{Time.now.strftime("%Y%m%d%H%M")}" else new_version = updated_version(old_version.gsub(/\.dev\d+$/, ''), arguments[:version])