From fabfdc77c299a4d5d6999f5a8699c6cac7fd77d2 Mon Sep 17 00:00:00 2001 From: alekfal Date: Mon, 30 Oct 2023 18:32:14 +0200 Subject: [PATCH] Add PyPI workflow (#19) --- .github/workflows/publish.yml | 43 +++++++++++++++++++++++++++++++++++ setup.py | 2 +- 2 files changed, 44 insertions(+), 1 deletion(-) 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..f6688d6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,43 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/setup.py b/setup.py index 4d09c31..83179fe 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ description = "Download Sentinel 2 data from GCP", long_description = long_description, long_description_content_type = "text/markdown", - url="nope.gg", + url="https://googlesat.readthedocs.io/en/latest/", packages = setuptools.find_namespace_packages(), include_package_data=True, license="MIT",