Skip to content

Commit ce167d3

Browse files
committed
adding extra field variables
1 parent 73376b4 commit ce167d3

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/python-publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,19 @@ jobs:
3030
- name: Install dependencies
3131
run: pip install -r requirements.txt
3232

33-
- name: Install build
34-
run: python -m pip install build
33+
- name: Extract tag name
34+
id: tag
35+
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
36+
37+
- name: Update version in setup.py
38+
run: >-
39+
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py
3540
3641
- name: Build a binary wheel and a source tarball
3742
run: python -m build --sdist --wheel --outdir dist/
3843

3944
- name: Publish distribution 📦 to PyPI
40-
uses: pypa/gh-action-pypi-publish@release
45+
uses: pypa/gh-action-pypi-publish@main
4146
with:
4247
user: __token__
4348
password: ${{ secrets.PYPI_API_TOKEN }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name = 'torch-cfd',
55
packages=find_packages(include=['torch_cfd', 'torch_cfd.*']),
6-
version = '0.0.1',
6+
version='{{VERSION_PLACEHOLDER}}',
77
license='Apache-2.0',
88
description = 'PyTorch CFD',
99
long_description='PyTorch Computational Fluid Dynamics Library',

0 commit comments

Comments
 (0)