Use full versions specs for all github actions #158
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: Publish Python Package | ||
| # Upload to PyPI is triggered by creating & publishing a release in GitHub UI | ||
| env: | ||
| UV_VERSION: "0.7.13" | ||
| on: | ||
| release: | ||
| # Trigger the workflow only for real releases but not for draft releases | ||
| types: [created] | ||
| jobs: | ||
| build: | ||
| name: Build Python 🐍 distributions 📦 for publishing to PyPI | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| <<<<<<< HEAD | ||
| - uses: actions/checkout@v5 | ||
| ======= | ||
| - uses: actions/checkout@v5.0.0 | ||
| >>>>>>> a88559e (Use full versions specs for all github actions) | ||
| with: | ||
| # Checkout the code including tags required for dynamic versioning | ||
| fetch-depth: 0 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5.6.0 | ||
| with: | ||
| python-version: 3.13 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6.6.1 | ||
| with: | ||
| enable-cache: true | ||
| version: ${{ env.UV_VERSION }} | ||
| - name: Build source and wheel archives | ||
| run: | | ||
| uv build | ||
| - name: Store built distribution | ||
| uses: actions/upload-artifact@v4.6.2 | ||
| with: | ||
| name: distribution-files | ||
| path: dist/ | ||
| pypi-publish: | ||
| name: Build and publish Python 🐍 package 📦 to PyPI | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| # Uses trusted publishing. https://docs.pypi.org/trusted-publishers/adding-a-publisher/ | ||
| environment: | ||
| name: pypi-release | ||
| url: https://pypi.org/p/linkml-runtime | ||
| permissions: | ||
| id-token: write # This permission is mandatory for trusted publishing. | ||
| steps: | ||
| - name: Download built distribution | ||
| uses: actions/download-artifact@v5.0.0 | ||
| with: | ||
| name: distribution-files | ||
| path: dist | ||
| - name: Publish package 📦 to PyPI | ||
| if: github.event_name == 'release' | ||
| uses: pypa/gh-action-pypi-publish@v1.12.4 | ||
| with: | ||
| verbose: true | ||