Skip to content

Commit

Permalink
test publish pypi with github actions (#331)
Browse files Browse the repository at this point in the history
publish pypi
  • Loading branch information
NewFuture authored Jul 23, 2022
1 parent d4b397d commit 5e82c68
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
docker-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: GetRepo
id: repo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- master
tags:
- v*

jobs:
buildx-dockerhub:
runs-on: ubuntu-latest
Expand All @@ -19,8 +19,7 @@ jobs:
DOCKER_PLATFORMS: linux/amd64,linux/arm,linux/arm64
DOCKER_REGISTRY: ""
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker buildx
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/release/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#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: publish python

on:
push:
branches:
- master
tags:
- v*
- V*
permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.x
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build --sdist --wheel --outdir dist/
# - name: Publish
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}
# print_hash: true
- name: Publish distribution 📦 to Test PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
print_hash: true
7 changes: 1 addition & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable',

# Indicate who your project is intended for
'Intended Audience :: Developers',
Expand All @@ -126,13 +126,8 @@
# that you indicate whether you support Python 2, Python 3 or both.
# These classifiers are *not* checked by 'pip install'. See instead
# 'python_requires' below.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],

# This field adds keywords for your project which will appear on the
Expand Down

0 comments on commit 5e82c68

Please sign in to comment.