jakob-keller is releasing peprock π #38
This file contains 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: Release | |
run-name: ${{ github.actor }} is releasing peprock π | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
inputs: | |
increment: | |
description: 'Increment' | |
type: choice | |
options: | |
- "" | |
- "MAJOR" | |
- "MINOR" | |
- "PATCH" | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
env: | |
UV_PYTHON_PREFERENCE: only-system | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: uv | |
name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
- id: cz | |
name: Create bump and changelog | |
uses: commitizen-tools/commitizen-action@0.23.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
extra_requirements: "uv==${{ steps.uv.outputs.uv-version }}" | |
increment: ${{ inputs.increment }} | |
check_consistency: true | |
- name: Build package | |
run: uv build | |
- name: Release to GitHub | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: dist/* | |
tag_name: ${{ steps.cz.outputs.version }} | |
fail_on_unmatched_files: true | |
generate_release_notes: true | |
- name: Publish peprock π¦ to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
attestations: false | |
- name: Publish peprock π¦ to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Build documentation | |
run: uv run pdoc --html peprock | |
- name: Upload documentation | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: "html/peprock" | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 | |
- run: echo "π This job's status is ${{ job.status }}." |