From d8a722191c1d0856f38c7f9310aeec59c5ddaef3 Mon Sep 17 00:00:00 2001 From: Julius Busecke Date: Thu, 16 Nov 2023 15:22:30 -0800 Subject: [PATCH] Add release workflow --- .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..2bc9cb1 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Release Python Package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + if: github.repository == 'carbonplan/pangeo-forge-bigquery' + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools setuptools-scm build twine + - name: Build and publish + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + python -m build + twine check dist/* + twine upload dist/*