Skip to content

Commit

Permalink
chore: add pypi github action
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture authored Dec 10, 2023
1 parent c7e1b2d commit a2543b9
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release to PyPI

permissions:
contents: write

on:
push:

jobs:
build:
name: build dist files
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.9

- name: install build
run: python -m pip install --upgrade build

- name: build dist
run: python -m build

- uses: actions/upload-artifact@v3
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
environment:
name: pypi-release
url: https://pypi.org/project/Authlib/
permissions:
id-token: write
name: release to pypi
needs: build
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
with:
name: artifacts
path: dist

- name: Push build artifacts to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
repository-url: https://test.pypi.org/legacy/
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a2543b9

Please sign in to comment.