From ffdba50968ae9b6a5c33d5c1ff9475c9e00ed3eb Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 2 Jun 2025 18:06:34 +0200 Subject: [PATCH] CD config added and project file updated --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++++++++++++++ pyproject.toml | 3 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..151e2a7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +name: Publish to PyPI + +on: + push: + tags: + - "v*" + +jobs: + publish: + name: Build and publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Ensure this is main branch + if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') + run: echo "Proceeding with publish" + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install build tools + run: python -m pip install --upgrade build twine pyyaml + + - name: Prepare data and compile thermo database + run: | + python thermo_data/combine_data.py thermo_data/combined_data.yaml thermo_data/nasa9*.yaml thermo_data/nasa9*.xml + python thermo_data/compile_to_bin.py thermo_data/combined_data.yaml src/gaspype/data/therm_data.bin + + - name: Build package + run: python -m build + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + + run: python -m twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml index a494b59..2e38725 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "gaspype" -version = "1.0.1" +version = "1.1.0" authors = [ { name="Nicolas Kruse", email="nicolas.kruse@dlr.de" }, ] @@ -20,6 +20,7 @@ dependencies = [ [project.urls] Homepage = "https://github.com/DLR-Institute-of-Future-Fuels/gaspype" Issues = "https://github.com/DLR-Institute-of-Future-Fuels/gaspype/issues" +documentation = "https://dlr-institute-of-future-fuels.github.io/gaspype/" [build-system] requires = ["setuptools>=61.0", "wheel"]