diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b65dbf6..7876c18e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -359,21 +359,28 @@ jobs: release: name: Release - if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' - runs-on: ubuntu-latest - environment: Publish + environment: pypipublish needs: [linux, windows, macos_x86, macos_aarch64, sdist] + permissions: + id-token: write + contents: read steps: + - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: pattern: wheels-* - name: wheels + path: dist + merge-multiple: true + - name: List contents of dist directory + run: ls -la dist/ - name: Publish to PyPI - uses: PyO3/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.caipypi }} + uses: pypa/gh-action-pypi-publish@release/v1 with: - command: upload - args: --non-interactive --skip-existing * + packages-dir: dist + # verbose: true + # print-hash: true + # Uncomment below for test runs, otherwise fails on existing packages being reuploaded + skip-existing: true + diff --git a/Cargo.toml b/Cargo.toml index 7f4414da..611ec309 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c2pa-python" -version = "0.8.2" +version = "0.9.0" edition = "2021" authors = ["Gavin Peacock =1.7.4,<2.0","uniffi_bindgen>=0.28,<0.30"] build-backend = "maturin" [project] -name = "c2pa" +name = "c2pa-python" dependencies = ["cffi"] requires-python = ">=3.7" description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library" @@ -27,4 +27,7 @@ urls = {homepage = "https://contentauthenticity.org", repository = "https://gith [project.optional-dependencies] test = [ "pytest < 5.0.0" -] \ No newline at end of file +] + +[tool.maturin] +module-name = "c2pa" \ No newline at end of file diff --git a/tests/test_api.py b/tests/test_api.py index 8e805f2a..490bf086 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -63,7 +63,7 @@ def getitem(d, key): class TestC2paSdk(unittest.TestCase): def test_version(self): - assert version() == "0.8.2" + assert version() == "0.9.0" def test_sdk_version(self): assert "c2pa-rs/" in sdk_version() diff --git a/tests/test_unit_tests.py b/tests/test_unit_tests.py index a3572bb6..d36473d6 100644 --- a/tests/test_unit_tests.py +++ b/tests/test_unit_tests.py @@ -25,7 +25,7 @@ class TestC2paSdk(unittest.TestCase): def test_version(self): - self.assertIn("0.8.2", sdk_version()) + self.assertIn("0.9.0", sdk_version()) class TestReader(unittest.TestCase):