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:
|
||||
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
|
||||
|
|
10
setup.py
10
setup.py
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue