Skip to content

Commit

Permalink
Merge pull request #2499 from KS-HTK/feature/dev-releases-workflows
Browse files Browse the repository at this point in the history
dev releases and workflows
  • Loading branch information
KS-HTK authored Dec 19, 2024
2 parents 6515869 + 05f46d4 commit 8e94af3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/upload_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ name: upload
# Controls when the action will run.
on:
# Allows you to run this workflow manually from the Actions tab
push:
branches:
- master
workflow_dispatch:
inputs:
upload_server:
description: 'upload server'
required: true
default: 'testpypi'
type: choice
options:
- 'testpypi'
- 'pypi'

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand All @@ -31,10 +38,23 @@ jobs:
# Upgrade pip
python3 -m pip install --upgrade pip
# Install twine
python3 -m pip install setuptools wheel twine
python3 -m pip install build setuptools wheel twine
# Upload to TestPyPI
- name: Build and Upload to TestPyPI
if: ${{ inputs.upload_server == 'testpypi' }}
run: |
python3 -m build
python3 -m twine check dist/* --strict
python3 -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI }}
TWINE_REPOSITORY: testpypi

# Upload to PyPI
- name: Build and Upload to PyPI
if: ${{ inputs.upload_server == 'pypi' }}
run: |
python3 -m build
python3 -m twine check dist/* --strict
Expand All @@ -59,7 +79,7 @@ jobs:
ref_name: develop


# Run an install for testing
# Run an installation for testing
- name: Install pandapower from PyPI
run: |
python3 -m pip install pandapower
Expand Down
2 changes: 1 addition & 1 deletion pandapower/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import importlib.metadata

__version__ = importlib.metadata.version("pandapower")
__format_version__ = "3.0.0"
__format_version__ = "3.0.0.dev0"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pandapower"
version = "3.0.0" # File format version '__format_version__' is tracked in _version.py
version = "3.0.0.dev0" # File format version '__format_version__' is tracked in _version.py
authors = [
{ name = "Leon Thurner", email = "[email protected]" },
{ name = "Alexander Scheidler", email = "[email protected]" }
Expand Down

0 comments on commit 8e94af3

Please sign in to comment.