Skip to content

Commit

Permalink
check building of packages with adding the poetry dynamic versioning …
Browse files Browse the repository at this point in the history
…plugin specifically
  • Loading branch information
CPrescher committed Nov 14, 2023
1 parent c11eaf0 commit 5a8281b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
52 changes: 27 additions & 25 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

# This workflow installs python, poetry, and builds the package
# It then uploads the wheels to the artifacts and later to PyPI
name: CD

on:
release:
types: [published]
[push]
# release:
# types: [published]

jobs:
build_package:
Expand All @@ -18,6 +18,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Poetry
uses: snok/install-poetry@v1
Expand All @@ -28,8 +30,8 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies
run: poetry install
- name: Add Dynamic Versioning Plugin
run: poetry self add poetry-dynamic-versioning[plugin]

- name: Build Package
run: poetry build
Expand All @@ -40,23 +42,23 @@ jobs:
name: wheels
path: dist/*

pypi-publish:
name: Upload release to PyPI
needs: build_package
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/glassure/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist
# pypi-publish:
# name: Upload release to PyPI
# needs: build_package
# runs-on: ubuntu-latest
# environment:
# name: pypi
# url: https://pypi.org/p/glassure/
# permissions:
# id-token: write
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# path: dist

- name: check the dist folder
run: ls dist
# - name: check the dist folder
# run: ls dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 10 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ files = ["glassure/__init__.py"]


[tool.poetry.dependencies]
python = "^3.9, <3.12"
numpy = "^1.25.2"
scipy = "^1.11.2"
python = "^3.9, <3.13"
numpy = [
{ version = "^1.24.0", python = "<3.10" },
{ version = "^1.26.0", python = ">=3.10" }
]
scipy = [
{ version = "^1.9.3", python = "<3.10" },
{ version = "^1.11.3", python = ">=3.10" }
]
lmfit = "^1.2.0"
pandas = "^2.1.0"
pyqtgraph = "^0.13.3"
Expand All @@ -54,4 +60,4 @@ sphinx-rtd-theme = "^1.3.0"

[build-system]
requires = ["poetry-core", "poetry-dynamic-versioning"]
build-backend = ["poetry.core.masonry.api", "poetry_dynamic_versioning.backend"]
build-backend = "poetry_dynamic_versioning.backend"

0 comments on commit 5a8281b

Please sign in to comment.