docs: add push notifications configuration to README #104
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 to PyPI | |
| on: | |
| # Trigger on GitHub releases | |
| release: | |
| types: [published] | |
| # Trigger on version tags | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for hatch-vcs versioning | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Build web frontend | |
| working-directory: klondike-web | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Verify static assets exist | |
| run: | | |
| if [ ! -d src/klondike_spec_cli/static ] || [ -z "$(ls -A src/klondike_spec_cli/static)" ]; then | |
| echo "Build output missing! Check the web build step." | |
| exit 1 | |
| fi | |
| echo "Static assets built successfully:" | |
| ls -la src/klondike_spec_cli/static/ | |
| - name: Install build dependencies | |
| run: uv pip install --system build hatchling hatch-vcs | |
| - name: Build package | |
| run: python -m build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| publish-pypi: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/klondike-spec-cli | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true |