Append timestamp to TestPyPI build versions
This should allow the same "version" to be uploaded for each commit.main
parent
118c9da813
commit
5d86326ae6
|
@ -31,6 +31,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||||
repository_url: https://test.pypi.org/legacy/
|
repository_url: https://test.pypi.org/legacy/
|
||||||
|
env:
|
||||||
|
DEV_BUILD: 1
|
||||||
- name: Publish distribution to PyPI
|
- name: Publish distribution to PyPI
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
|
10
setup.py
10
setup.py
|
@ -1,14 +1,20 @@
|
||||||
|
import os
|
||||||
import setuptools
|
import setuptools
|
||||||
|
import time
|
||||||
|
|
||||||
long_description = open('README.md', 'r').read()
|
long_description = open('README.md', 'r').read()
|
||||||
|
|
||||||
requirements = list(open('requirements.txt', 'r'))
|
requirements = list(open('requirements.txt', 'r'))
|
||||||
|
|
||||||
|
optional_dev_tag = ''
|
||||||
|
if os.getenv('DEV_BUILD'):
|
||||||
|
optional_dev_tag = '.dev' + str(int(time.time()))
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
author='Ben Busby',
|
author='Ben Busby',
|
||||||
author_email='benbusby@protonmail.com',
|
author_email='contact@benbusby.com',
|
||||||
name='whoogle-search',
|
name='whoogle-search',
|
||||||
version='0.5.4',
|
version='0.5.4' + optional_dev_tag,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
description='Self-hosted, ad-free, privacy-respecting metasearch engine',
|
description='Self-hosted, ad-free, privacy-respecting metasearch engine',
|
||||||
|
|
Loading…
Reference in New Issue