Request that docs contributors use semantic linefeeds #85
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 and publish | |
| on: | |
| pull_request: | |
| push: | |
| tags: | |
| - v* | |
| # Only allow one instance of this workflow for each PR. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: hynek/build-and-inspect-python-package@v2 | |
| verify: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| if: github.repository_owner == 'kraken-tech' && github.ref_type == 'tag' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.github/workflows/.python-version' | |
| cache: 'pip' | |
| - run: python -m pip install . | |
| - id: package_version | |
| run: echo "version=$(python -c "from importlib.metadata import version; print(version('django-subatomic'))")" >> "$GITHUB_OUTPUT" | |
| - name: check package version matches tag | |
| run: | | |
| [ "v${{ steps.package_version.outputs.version }}" = "${{ github.ref_name }}" ] | |
| - name: check changelog includes version | |
| run: grep '## \[${{ steps.package_version.outputs.version }}\]' < CHANGELOG.md | |
| pypi: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| needs: [build, verify] | |
| if: github.repository_owner == 'kraken-tech' && github.ref_type == 'tag' | |
| environment: publish | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| name: Packages | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| docs: | |
| runs-on: ubuntu-latest | |
| needs: [pypi] | |
| if: github.repository_owner == 'kraken-tech' && github.ref_type == 'tag' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.github/workflows/.python-version' | |
| - name: Install Dependencies | |
| run: | | |
| pip install --group docs . | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "GitHub docs action" | |
| git config --global user.email "[email protected]" | |
| - name: Build Docs Site | |
| run: | | |
| mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest | |
| mike set-default latest --push |