From 8067be20cfea538cf052a9b8395804f3a2349e11 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:31:13 -0300 Subject: [PATCH 1/7] Fixing pyproject --- pyproject.toml | 5 +++-- python_web3_wallet/frontend/.env.example | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4d41ecc..116251e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,13 @@ [tool.poetry] name = "python-web3-wallet" -version = "0.0.12" +version = "0.0.13" description = "Streamlit component that allows users to connect a wallet and send transactions with dynamic recipients and amounts" authors = ["Gnosis AI "] license = "MIT" readme = "README.md" +# If format not specified, include only applies to sdist not wheel https://python-poetry.org/docs/pyproject/#exclude-and-include. include = [ - "python_web3_wallet/frontend/build/**/*" + { path = "python_web3_wallet/frontend/build/**/*", format = ["sdist", "wheel"] } ] packages = [ { include = "python_web3_wallet" } diff --git a/python_web3_wallet/frontend/.env.example b/python_web3_wallet/frontend/.env.example index cb7884e..74d6fcc 100644 --- a/python_web3_wallet/frontend/.env.example +++ b/python_web3_wallet/frontend/.env.example @@ -1,4 +1,4 @@ PORT=3001 BROWSER=none -REACT_APP_RAINBOW_WALLET_PROJECT_ID= +REACT_APP_RAINBOW_PROJECT_ID= PYPI_TOKEN= \ No newline at end of file From 44ebdb239d3aab03c3bfd292f53f0cb9ce90ce16 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:37:13 -0300 Subject: [PATCH 2/7] Added dev publishing to publish.yml --- .github/workflows/publish.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6f578f4..2712df9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: jobs: build: - if: github.event_name == 'release' + if: github.event_name == 'release' || (contains(github.event.pull_request.body, 'deploy please') && github.event_name == 'pull_request') runs-on: ubuntu-latest permissions: contents: write @@ -62,3 +62,26 @@ jobs: password: ${{ secrets.PYPI_TOKEN }} verify-metadata: false verbose: true + + publish-dev-package: + if: contains(github.event.pull_request.body, 'deploy please') && github.event_name == 'pull_request' + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/python-web3-wallet + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Set Development Version + run: | + current_version=$(poetry version -s) + poetry version "${current_version}.dev${{ github.run_number }}" + shell: bash + - name: Build and Publish Development Package + run: poetry publish -p ${{ secrets.PYPI_TOKEN }} -u "__token__" --build + shell: bash \ No newline at end of file From de69024116fcb5e5c24c5558dfda17a9d4874fd8 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:38:25 -0300 Subject: [PATCH 3/7] dummy change --- python_web3_wallet/README | 1 + 1 file changed, 1 insertion(+) diff --git a/python_web3_wallet/README b/python_web3_wallet/README index bf79ef9..e698db5 100644 --- a/python_web3_wallet/README +++ b/python_web3_wallet/README @@ -16,3 +16,4 @@ poetry publish -p {PYPI_TEST_TOKEN} -u "__token__" --build --repository testpypi # upload to pypi poetry publish -p {PYPI_TOKEN} -u "__token__" --build ``` + From 44f386cf2ee91c60da50e87f8157915e232577ed Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:39:57 -0300 Subject: [PATCH 4/7] typo --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2712df9..1423a2e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -73,10 +73,10 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ - name: Set Development Version run: | current_version=$(poetry version -s) From 431885db90fc1b9bdef2731659f0ddbfb12f8547 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:40:59 -0300 Subject: [PATCH 5/7] missing needs --- .github/workflows/publish.yml | 3 +++ python_web3_wallet/README | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1423a2e..516c2f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,6 +64,9 @@ jobs: verbose: true publish-dev-package: + name: Publish dev package + needs: + - build if: contains(github.event.pull_request.body, 'deploy please') && github.event_name == 'pull_request' runs-on: ubuntu-latest environment: diff --git a/python_web3_wallet/README b/python_web3_wallet/README index e698db5..bf79ef9 100644 --- a/python_web3_wallet/README +++ b/python_web3_wallet/README @@ -16,4 +16,3 @@ poetry publish -p {PYPI_TEST_TOKEN} -u "__token__" --build --repository testpypi # upload to pypi poetry publish -p {PYPI_TOKEN} -u "__token__" --build ``` - From f6ccab8dc8d462113ddd2eae9d1083ae6ed919b6 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:45:08 -0300 Subject: [PATCH 6/7] added if to step --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 516c2f2..afbbf6a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,6 +17,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Verify the tag version in the pyproject.toml + if: github.event_name == 'release' run: grep -q "version = \"${{ github.event.release.tag_name }}\"" pyproject.toml || exit 1 shell: bash - name: Set Node.js 20.x From bbe77375c27abb7cc3d86f7eb3e00d8ba6ac6635 Mon Sep 17 00:00:00 2001 From: gabrielfior Date: Thu, 9 Jan 2025 15:59:00 -0300 Subject: [PATCH 7/7] Final changes before PR --- .github/workflows/publish.yml | 31 ++----------------------------- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index afbbf6a..b35b439 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,7 +7,7 @@ on: jobs: build: - if: github.event_name == 'release' || (contains(github.event.pull_request.body, 'deploy please') && github.event_name == 'pull_request') + if: github.event_name == 'release' runs-on: ubuntu-latest permissions: contents: write @@ -17,7 +17,6 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - name: Verify the tag version in the pyproject.toml - if: github.event_name == 'release' run: grep -q "version = \"${{ github.event.release.tag_name }}\"" pyproject.toml || exit 1 shell: bash - name: Set Node.js 20.x @@ -62,30 +61,4 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} verify-metadata: false - verbose: true - - publish-dev-package: - name: Publish dev package - needs: - - build - if: contains(github.event.pull_request.body, 'deploy please') && github.event_name == 'pull_request' - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/python-web3-wallet - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - steps: - - name: Download all the dists - uses: actions/download-artifact@v4 - with: - name: python-package-distributions - path: dist/ - - name: Set Development Version - run: | - current_version=$(poetry version -s) - poetry version "${current_version}.dev${{ github.run_number }}" - shell: bash - - name: Build and Publish Development Package - run: poetry publish -p ${{ secrets.PYPI_TOKEN }} -u "__token__" --build - shell: bash \ No newline at end of file + verbose: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 116251e..4b29eeb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-web3-wallet" -version = "0.0.13" +version = "0.0.14" description = "Streamlit component that allows users to connect a wallet and send transactions with dynamic recipients and amounts" authors = ["Gnosis AI "] license = "MIT"