3.10 version in matrix read as 3.1? #2
Workflow file for this run
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: pypi_publish_and_docs | |
# only run when version tag is pushed | |
# allow to run manually | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
workflow_dispatch: | |
jobs: | |
fmt-and-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of rye | |
uses: eifinger/setup-rye@v4 | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
rye sync | |
- name: Lint | |
run: | | |
rye lint | |
- name: Format | |
run: | | |
rye fmt --check | |
test: | |
needs: fmt-and-lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.12] #[3.8, 3.9, 3.10, 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of rye | |
uses: eifinger/setup-rye@v4 | |
- name: Rye pin python version to ${{ matrix.python-version }} | |
run: | | |
rye pin ${{ matrix.python-version }} --no-update-requires-python | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
rye sync | |
# Run tests | |
- name: Run tests | |
run: | | |
rye test | |
publish-pypi: | |
needs: test | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/bibmancli | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of rye | |
uses: eifinger/setup-rye@v4 | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
rye sync | |
# Build the app | |
- name: Build the app | |
run: | | |
rye build | |
# Publish to PyPI | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# Create a release | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/*" | |
bodyFile: "CHANGELOG.md" | |
publish-docs: | |
needs: publish-pypi | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To push a branch | |
pages: write # To push to a GitHub Pages site | |
id-token: write # To update the deployment status | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of rye | |
uses: eifinger/setup-rye@v4 | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
rye sync | |
# Build the book | |
- name: Build the book | |
run: | | |
rye run mkdocs build | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: 'site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |