Skip to content

Commit

Permalink
Merge pull request #314 from CloudVE/add_packaging_action
Browse files Browse the repository at this point in the history
Add packaging action
  • Loading branch information
nuwang authored Sep 6, 2023
2 parents 614a7dc + a91c5c0 commit 3461fbe
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish cloudbridge to PyPI
on:
release:
types: [published]
push:
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: 3.10
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install --upgrade twine wheel
- name: Create and check packages
run: |
python3 setup.py sdist bdist_wheel
twine check dist/*
ls -l dist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
branches:
- master
workflow_dispatch: {}

jobs:
# Set the job key. The key is displayed as the job name
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# running the tests.

[tox]
envlist = {py3.8,pypy}-{aws,azure,gcp,openstack,mock},lint
envlist = {py3.10,pypy}-{aws,azure,gcp,openstack,mock},lint

[testenv]
commands = # see setup.cfg for options sent to nosetests and coverage
Expand Down

0 comments on commit 3461fbe

Please sign in to comment.