Append timestamp to TestPyPI build versions

This should allow the same "version" to be uploaded for each commit.
main
Ben Busby 2021-08-31 09:00:55 -06:00
parent 118c9da813
commit 5d86326ae6
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
2 changed files with 10 additions and 2 deletions

View File

@ -31,6 +31,8 @@ jobs:
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
env:
DEV_BUILD: 1
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master

View File

@ -1,14 +1,20 @@
import os
import setuptools
import time
long_description = open('README.md', 'r').read()
requirements = list(open('requirements.txt', 'r'))
optional_dev_tag = ''
if os.getenv('DEV_BUILD'):
optional_dev_tag = '.dev' + str(int(time.time()))
setuptools.setup(
author='Ben Busby',
author_email='benbusby@protonmail.com',
author_email='contact@benbusby.com',
name='whoogle-search',
version='0.5.4',
version='0.5.4' + optional_dev_tag,
include_package_data=True,
install_requires=requirements,
description='Self-hosted, ad-free, privacy-respecting metasearch engine',