From da71ada9a88466fed01eaa36f2d93c697b83345f Mon Sep 17 00:00:00 2001 From: Aaron Gibson Date: Fri, 6 Mar 2026 09:26:57 +0000 Subject: [PATCH] add workflow to publish oonidata to PyPI --- .github/workflows/release_oonidata.yml | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/release_oonidata.yml diff --git a/.github/workflows/release_oonidata.yml b/.github/workflows/release_oonidata.yml new file mode 100644 index 00000000..a1204a7b --- /dev/null +++ b/.github/workflows/release_oonidata.yml @@ -0,0 +1,32 @@ +name: Publish oonidata to PyPI + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' # Specify the Python version + + - name: Install Hatch + run: | + python -m pip install --upgrade pip + pip install hatch + + - name: Publish oonidata + run: | + cd oonidata + hatch publish + env: + HATCH_INDEX_USER: __token__ + HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }} + if: secrets.PYPI_TOKEN != '' # Only run if PYPI_TOKEN is set