Create release-publish.yml

This commit is contained in:
Sitoi 2024-01-07 21:58:44 +08:00 committed by GitHub
parent df742a681a
commit 9c8ddf827a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

38
.github/workflows/release-publish.yml vendored Normal file
View File

@ -0,0 +1,38 @@
# This workflow will upload a Python Package using Twine when a release is published
# For more information see: https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Upload Release to PyPi
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}