-
Notifications
You must be signed in to change notification settings - Fork 15
38 lines (32 loc) · 961 Bytes
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: python
package-name: pydantic-mongo
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- name: Set up Python
uses: actions/setup-python@v4
if: ${{ steps.release.outputs.release_created }}
with:
python-version: 3.9
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
python -m pip install --upgrade pip
pip install wheel build
python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ steps.release.outputs.release_created }}
with:
password: ${{ secrets.PYPI_API_TOKEN }}