Skip to content

Commit b41be67

Browse files
tmatherngpeacock
andauthored
ci: Update setup for publishing (#100)
* chore: repair publishing process * chore: update release workflow * chore: yet another publish attempt * ci: Change setup * fix: change settings * fix: Make things verbose * fix: Debug release * fix: Deprecation * fix: Rename env * fix: Clean up * fix: Logs * fix: Different name * fix: Fix logs * fix: Fix logs 2 * fix: Fix logs 2 * fix: Fix namings * fix: Fix namings 2 * fix: Skip existing * fix: Version bump * fix: Revert version number change * fix: Naming * fix: Remove debug code * fix: skip existing set back to true * fix: Bump version --------- Co-authored-by: Gavin Peacock <[email protected]>
1 parent c94a985 commit b41be67

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -359,21 +359,28 @@ jobs:
359359

360360
release:
361361
name: Release
362-
363362
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
364-
365363
runs-on: ubuntu-latest
366-
environment: Publish
364+
environment: pypipublish
367365
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
366+
permissions:
367+
id-token: write
368+
contents: read
368369
steps:
370+
- uses: actions/checkout@v4
369371
- uses: actions/download-artifact@v4
370372
with:
371373
pattern: wheels-*
372-
name: wheels
374+
path: dist
375+
merge-multiple: true
376+
- name: List contents of dist directory
377+
run: ls -la dist/
373378
- name: Publish to PyPI
374-
uses: PyO3/maturin-action@v1
375-
env:
376-
MATURIN_PYPI_TOKEN: ${{ secrets.caipypi }}
379+
uses: pypa/gh-action-pypi-publish@release/v1
377380
with:
378-
command: upload
379-
args: --non-interactive --skip-existing *
381+
packages-dir: dist
382+
# verbose: true
383+
# print-hash: true
384+
# Uncomment below for test runs, otherwise fails on existing packages being reuploaded
385+
skip-existing: true
386+

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "c2pa-python"
3-
version = "0.8.2"
3+
version = "0.9.0"
44
edition = "2021"
55
authors = ["Gavin Peacock <[email protected]"]
66

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["maturin>=1.7.4,<2.0","uniffi_bindgen>=0.28,<0.30"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "c2pa"
6+
name = "c2pa-python"
77
dependencies = ["cffi"]
88
requires-python = ">=3.7"
99
description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library"
@@ -27,4 +27,7 @@ urls = {homepage = "https://contentauthenticity.org", repository = "https://gith
2727
[project.optional-dependencies]
2828
test = [
2929
"pytest < 5.0.0"
30-
]
30+
]
31+
32+
[tool.maturin]
33+
module-name = "c2pa"

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def getitem(d, key):
6363

6464
class TestC2paSdk(unittest.TestCase):
6565
def test_version(self):
66-
assert version() == "0.8.2"
66+
assert version() == "0.9.0"
6767

6868
def test_sdk_version(self):
6969
assert "c2pa-rs/" in sdk_version()

tests/test_unit_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class TestC2paSdk(unittest.TestCase):
2727
def test_version(self):
28-
self.assertIn("0.8.2", sdk_version())
28+
self.assertIn("0.9.0", sdk_version())
2929

3030

3131
class TestReader(unittest.TestCase):

0 commit comments

Comments
 (0)