From f658d90f205b443d2895f132a34074a4b4169840 Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Tue, 15 Jul 2025 14:09:43 -0400 Subject: [PATCH 1/2] Publish changelog on release --- .github/workflows/release.yml | 31 ++++++++++++++++++++++++++++++- pyproject.toml | 2 +- src/bitpay/config.py | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5c2673..50a1514 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,4 +33,33 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages_dir: artifact/ \ No newline at end of file + packages_dir: artifact/ + + readme-changelog: + name: Publish changelog to Readme + needs: ['pypi-publish'] + runs-on: ubuntu-latest + steps: + - name: Extract release data + id: release + run: | + echo "title=$(echo "${{ github.event.release.name }}" | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT + echo "body=$(echo "${{ github.event.release.body }}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT + + - name: Publish changelog to Readme + env: + README_API_KEY: ${{ secrets.README_API_KEY }} + run: | + curl --location 'https://api.readme.com/v2/changelogs' \ + --header "Authorization: Bearer $README_API_KEY" \ + --header 'Content-Type: application/json' \ + --data '{ + "author": { + "id": "62fee95665f6d6003c12b799" + }, + "body": "${{ steps.release.outputs.body }}", + "title": "Python Unified SDK ${{ steps.release.outputs.title }}", + "privacy": { + "view": "public" + } + }' diff --git a/pyproject.toml b/pyproject.toml index 8497e8d..1a82bf8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "bitpay" -version = "7.0.4" +version = "7.0.5" authors = [ { name="Antonio Buedo", email="sales-engineering@bitpay.com" }, ] diff --git a/src/bitpay/config.py b/src/bitpay/config.py index c41e963..3e39371 100644 --- a/src/bitpay/config.py +++ b/src/bitpay/config.py @@ -5,6 +5,6 @@ class Config(Enum): TEST_URL = "https://test.bitpay.com/" PROD_URL = "https://bitpay.com/" BITPAY_API_VERSION = "2.0.0" - BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v7.0.4" + BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v7.0.5" BITPAY_API_FRAME = "std" BITPAY_API_FRAME_VERSION = "1.0.0" From 763bb71ddf3784d324e5c81bbde3e9857db475f6 Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Tue, 15 Jul 2025 14:13:05 -0400 Subject: [PATCH 2/2] Let GitHub set the author --- .github/workflows/release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50a1514..995d7b4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,9 +54,6 @@ jobs: --header "Authorization: Bearer $README_API_KEY" \ --header 'Content-Type: application/json' \ --data '{ - "author": { - "id": "62fee95665f6d6003c12b799" - }, "body": "${{ steps.release.outputs.body }}", "title": "Python Unified SDK ${{ steps.release.outputs.title }}", "privacy": {