Skip to content

Commit

Permalink
🚧 Working on the deployment actions
Browse files Browse the repository at this point in the history
  • Loading branch information
amarrerod committed Sep 10, 2024
1 parent 1008de1 commit 5bc8401
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 63 deletions.
66 changes: 7 additions & 59 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
with:
python-version: "3.12"

- name: Install pypa/build
run: python3 -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python3 -m build
output-dir: ./dist/

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
name: py-packages
path: ./dist/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
Expand All @@ -46,54 +40,8 @@ jobs:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist
name: py-packages
path: ./dist/

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
2 changes: 1 addition & 1 deletion digneapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Alejandro Marrero"""
__email__ = "amarrerd@ull.edu.es"
__version__ = "0.2.1"
__version__ = "0.2.2"

from digneapy import core, domains, generators, operators, qd, solvers, utils
from digneapy._constants import Direction
Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ classifiers = [
]

[project.urls]
homepage = "https://github.com/dignea/digneapy"
source = "https://github.com/dignea/digneapy"
homepage = "https://github.com/dignea/DIGNEApy"
source = "https://github.com/dignea/DIGNEApy"
issues = "https://github.com/DIGNEA/DIGNEApy/issues"

[project.optional-dependencies]
Expand All @@ -65,6 +65,14 @@ before-test = "python -m pip install -r requirements.txt"
test-requires = "pytest"
test-command = "pytest --doctest-modules {project}/tests"
build-verbosity = 1

[tool.cibuildwheel.linux]
repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"


[tool.pytest.init_options]
filterwarnings = ["ignore::DeprecationWarning:THIRD_PARTY_NAME.*:"]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __str__(self):
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/dignea/digneapy",
version="0.2.1",
version="0.2.2",
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
zip_safe=False,
Expand Down

0 comments on commit 5bc8401

Please sign in to comment.