Fix missing ast import in conftest.py #643
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build distribution | |
| on: | |
| release: | |
| types: | |
| - published | |
| push: | |
| jobs: | |
| build-artifacts: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'carbonplan/offsets-db-data' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Pixi | |
| uses: prefix-dev/setup-pixi@v0.9.5 | |
| with: | |
| cache: true | |
| cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
| environments: publish | |
| - name: Build tarball and wheels | |
| run: | | |
| git clean -xdf | |
| git restore -SW . | |
| pixi run -e publish python -m build --sdist --wheel . | |
| - name: Check built artifacts | |
| run: | | |
| pixi run -e publish python -m twine check dist/* | |
| pwd | |
| if [ -f dist/offsets-db-data-unknown.tar.gz ]; then | |
| echo "❌ INVALID VERSION NUMBER" | |
| exit 1 | |
| else | |
| echo "✅ Looks good" | |
| fi | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: releases | |
| path: dist | |
| test-built-dist: | |
| needs: build-artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: releases | |
| path: dist | |
| - name: List contents of built dist | |
| run: | | |
| ls -ltrh | |
| ls -ltrh dist | |
| - name: Verify the built dist/wheel is valid | |
| if: github.event_name == 'push' | |
| run: | | |
| pip install --no-deps dist/offsets_db_data*.whl | |
| python -c "import offsets_db_data; print(offsets_db_data.__version__)" | |
| upload-to-pypi: | |
| needs: test-built-dist | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: releases | |
| path: dist | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.14.0 |