Move timestamp for dev builds into build process

pull/423/head
Ben Busby 3 years ago
parent c298b8447c
commit d1e0a06ebd
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14

@ -18,6 +18,8 @@ jobs:
pip install
build
--user
- name: Set dev timestamp
run: echo "DEV_BUILD=$(date +%s)" >> $GITHUB_ENV
- name: Build binary wheel and source tarball
run: >-
python -m
@ -26,8 +28,6 @@ jobs:
--wheel
--outdir dist/
.
env:
DEV_BUILD: 1
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:

@ -1,6 +1,5 @@
import os
import setuptools
import time
long_description = open('README.md', 'r').read()
@ -8,7 +7,7 @@ requirements = list(open('requirements.txt', 'r'))
optional_dev_tag = ''
if os.getenv('DEV_BUILD'):
optional_dev_tag = '.dev' + str(int(time.time()))
optional_dev_tag = '.dev' + os.getenv('DEV_BUILD')
setuptools.setup(
author='Ben Busby',

Loading…
Cancel
Save