diff --git a/.github/workflows/pip_release.yaml b/.github/workflows/pip_release.yaml new file mode 100644 index 0000000..1239df1 --- /dev/null +++ b/.github/workflows/pip_release.yaml @@ -0,0 +1,17 @@ +name: pip release +on: + release: + types: [published] +jobs: + pypi: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - run: python3 -m pip install --upgrade build && python3 -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index d079ed1..54c3742 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # python-nostr A Python library for making [Nostr](https://github.com/nostr-protocol/nostr) clients +
+[![pip release](https://github.com/jeffthibault/python-nostr/actions/workflows/pip_release.yaml/badge.svg)](https://github.com/jeffthibault/python-nostr/actions/workflows/pip_release.yaml) ## Usage **Generate a key**