Skip to content

Commit

Permalink
PyroFork: Update workflows
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed May 20, 2023
1 parent d1e6727 commit 01fc1fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/utils/randomize.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
line = re.sub(r'^__version__ = "'+ pyro_version +'"', '__version__ = "'+ version +'"', line)
f.write(line)

with open("setup.py", "r") as f:
with open("pyproject.toml", "r") as f:
lines = f.readlines()

with open("setup.py", "w") as f:
with open("pyproject.toml", "w") as f:
for line in lines:
line = re.sub(r' name="PyroFork"', ' name="PyroFork-dev"', line)
line = re.sub(r' "Development Status :: 5 - Production/Stable"', ' "Development Status :: 4 - Beta"', line)
line = re.sub(r'name = "pyrofork"', 'name = "pyrofork-dev"', line)
line = re.sub(r' "Development Status :: 5 - Production/Stable"', ' "Development Status :: 4 - Beta"', line)
f.write(line)
12 changes: 5 additions & 7 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
python -m pip install poetry
python .github/utils/randomize.py
- name: Build package
run: python -m build
- name: Publish package
- name: Build and Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine upload dist/*
python -m poetry config pypi-token.pypi "$PYPI_API_TOKEN"
make publish

0 comments on commit 01fc1fb

Please sign in to comment.