outputs: Use numbered transcript and CDS IDs #22
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
| on: | |
| push: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Lint | |
| run: uv run ruff check . | |
| build: | |
| needs: [lint] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Build | |
| run: uv build | |
| - name: Upload dists | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-dists | |
| path: dist/ | |
| publish-pypi: | |
| needs: [build] | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/p/geneml | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-dists | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| publish-github: | |
| needs: [build] | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download dists | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: python-dists | |
| path: dist/ | |
| - name: Build Changelog | |
| id: generate_changelog | |
| uses: mikepenz/release-changelog-builder-action@v5 | |
| with: | |
| mode: HYBRID | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ steps.generate_changelog.outputs.changelog }} | |
| files: | | |
| dist/*.tar.gz | |
| dist/*.whl |