From 09b0ae099a614065b824f734bc767543235a904b Mon Sep 17 00:00:00 2001 From: Daniel McDonald Date: Thu, 30 May 2024 12:59:54 -0700 Subject: [PATCH] rel: push to pypi --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1341fa1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release + +on: + push: + tags: + - '*' + +env: + earliest_python: "3.8" + latest_python: "3.12" + miniforge_version: "23.11.0-0" + miniforge_variant: "Mambaforge" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Build distribution + run: | + # set version from '${{ github.ref_name }}' + export RELEASE_VERSION=${{ github.ref_name }} + python setup.py sdist + + - name: Publish a Python distribution to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}