Skip to content

Commit

Permalink
Release/0.0.4 (#85)
Browse files Browse the repository at this point in the history
* feat: enable Solverz version peek

* update publish-to-pypi.yml
  • Loading branch information
rzyu45 authored Jun 3, 2024
1 parent f77864e commit 3347847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
build:
name: Build distribution πŸ“¦
name: Build distribution
runs-on: ubuntu-latest

steps:
Expand All @@ -29,7 +29,7 @@ jobs:

publish-to-pypi:
name: >-
Publish Python 🐍 distribution πŸ“¦ to PyPI
Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
Expand All @@ -46,12 +46,12 @@ jobs:
with:
name: python-package-distributions
path: dist/
- name: Publish distribution πŸ“¦ to PyPI
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution πŸ“¦ with Sigstore
Sign the Python distribution with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
Expand Down
8 changes: 8 additions & 0 deletions Solverz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@
from Solverz.utilities.profile import count_time
from Solverz.variable.ssymbol import Var, AliasVar
from Solverz.model.basic import Model

from importlib.metadata import version, PackageNotFoundError

try:
__version__ = version("Solverz")
except PackageNotFoundError:
# package is not installed
pass

0 comments on commit 3347847

Please sign in to comment.