chore: deps update #2
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: haidra_core build and publish | |
| on: | |
| push: | |
| branches: | |
| - releases | |
| jobs: | |
| build-n-publish: | |
| name: haidra_core build and publish | |
| runs-on: ubuntu-latest | |
| environment: # see https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/ | |
| name: pypi | |
| url: https://pypi.org/p/haidra-core/ | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
| contents: write | |
| pull-requests: read | |
| steps: | |
| - name: "📣 Release on push" | |
| id: release | |
| uses: rymndhng/release-on-push-action@v0.28.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| bump_version_scheme: patch | |
| use_github_release_notes: true | |
| - name: "✔️ Checkout" | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| # Pass the version number in an env var to the below steps | |
| - name: Set build version env var | |
| run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ steps.release.outputs.version }}" >> $GITHUB_ENV | |
| # We need python... | |
| - name: "🐍 Set up Python 3.10" | |
| if: ${{ steps.release.outputs.version != '' }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| # Install build deps | |
| - name: "🛠 Install pypa/build" | |
| if: ${{ steps.release.outputs.version != '' }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| # Build a pypi distribution using the env var version number | |
| - name: "🔧 Build a binary wheel and a source tarball" | |
| if: ${{ steps.release.outputs.version != '' }} | |
| run: >- | |
| python -m build --sdist --wheel --outdir dist/ . | |
| # # Publish the package | |
| - name: "📦 Publish distribution to PyPI" | |
| if: ${{ steps.release.outputs.version != '' }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 |