From 3108f0fc48891df6182a2246b76e831d339cbcb4 Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:33:59 +0000 Subject: [PATCH 1/5] ci: add pypi publish workflow --- .github/workflows/publish.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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..61d4372 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish + +on: + workflow_dispatch: + + push: + branches: + - "master" + +jobs: + pypi: + # workflow_dispatch can target any branch, so the ref check keeps releases to master + if: github.ref == 'refs/heads/master' && (startsWith(github.event.head_commit.message, 'release:') || github.event_name == 'workflow_dispatch') + runs-on: ubuntu-latest + environment: pypi + + permissions: + id-token: write # OIDC trusted publishing + contents: read + + steps: + - uses: actions/checkout@v7 + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.13" + - name: build package + run: | + python3 -m pip install build + python3 -m build + - name: publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From dcf462d6543e423cd0caa80e619b7bb010281c5f Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:33:59 +0000 Subject: [PATCH 2/5] docs: add release steps to readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index b8d4c70..bf8843b 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,16 @@ If you have any questions, requests or ideas open an issue or ask us in #develop You can find installation instructions and detailed instructions on how to use this package at the [dedicated documentation site](https://ark.dev/docs/sdk/python/crypto/intro). +## Releases + +Releases are published to [PyPI](https://pypi.org/project/arkecosystem-crypto/) by a GitHub action that runs when a commit prefixed with `release:` lands on `master`. + +1. Update `version` in `setup.py`, e.g. `version='2.1.0'`. +2. Move the `Unreleased` entries in `CHANGELOG.md` under a heading for the new version, e.g. `## 2.1.0 - 2026-12-03`. +3. Open a PR into `master` titled with the version, e.g. `release: 2.1.0`, and make sure the merge commit message starts with `release:`. + +PyPI does not accept a version that has already been published, so the release fails if the version has not been bumped. + ## Security If you discover a security vulnerability within this package, please send an e-mail to security@ark.io. All security vulnerabilities will be promptly addressed. From aa9eec87ad59aa2d0744c998d9926a326c9b442c Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:42:04 +0000 Subject: [PATCH 3/5] remove workflow dispatch option --- .github/workflows/publish.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 61d4372..94c9948 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,13 @@ name: Publish on: - workflow_dispatch: - push: branches: - "master" jobs: pypi: - # workflow_dispatch can target any branch, so the ref check keeps releases to master - if: github.ref == 'refs/heads/master' && (startsWith(github.event.head_commit.message, 'release:') || github.event_name == 'workflow_dispatch') + if: startsWith(github.event.head_commit.message, 'release:') runs-on: ubuntu-latest environment: pypi From 858db939a6b268cc87a25a04a5fac2b156f4fa7a Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:43:16 +0000 Subject: [PATCH 4/5] spacing --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 275262d..0eefbbd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,11 +18,13 @@ jobs: uses: actions/setup-python@v7 with: python-version: "3.13" + - name: install dependencies run: | python3 -m venv venv . venv/bin/activate pip install .[test] + - name: run flake8 run: | . venv/bin/activate From ea1624de65e5c8e531b4b40484c3f26f99a016fe Mon Sep 17 00:00:00 2001 From: Alex Barnsley <8069294+alexbarnsley@users.noreply.github.com> Date: Thu, 3 Dec 2026 16:44:11 +0000 Subject: [PATCH 5/5] spacing --- .github/workflows/publish.yml | 2 ++ .github/workflows/test.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94c9948..97065e4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,9 +21,11 @@ jobs: uses: actions/setup-python@v7 with: python-version: "3.13" + - name: build package run: | python3 -m pip install build python3 -m build + - name: publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba2b841..dc7d6ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,16 +22,19 @@ jobs: uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} + - name: install dependencies run: | python3 -m venv venv . venv/bin/activate pip install .[test] + - name: run tests run: | . venv/bin/activate mkdir test-results pytest -v -s --junitxml=test-reports/junit.xml --cov=crypto --cov-config=.coveragerc --cov-report xml + - name: Codecov uses: codecov/codecov-action@v7 with: