-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
81 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
push: | ||
tags: | ||
- "**" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Configure Git Credentials | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.12" | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
run: uv python install 3.12 | ||
|
||
- name: Install dependencies | ||
run: uv sync --frozen | ||
|
||
- run: uv run mkdocs gh-deploy --force |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,59 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
name: Publish Python Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: read | ||
- "**" | ||
|
||
jobs: | ||
deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
version: ${{ steps.inspect_package.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "0.4.12" | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
run: uv python install 3.12 | ||
|
||
- name: Build package | ||
run: uv build | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install build | ||
pip install -e '.[docs]' | ||
- name: Inspect package version | ||
id: inspect_package | ||
run: | | ||
version=$(uvx hatchling version) | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
- name: Build package | ||
run: python -m build | ||
- name: Upload package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: package-distributions | ||
path: dist/ | ||
|
||
- name: Publish package | ||
uses: pypa/[email protected] | ||
pypi-publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
permissions: | ||
id-token: write | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/project/python-multipart/${{ needs.build.outputs.version }} | ||
|
||
steps: | ||
- name: Download package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Publish docs | ||
run: mkdocs gh-deploy --force | ||
name: package-distributions | ||
path: dist/ | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
multipart.fastapiexpert.com |