Skip to content

Commit

Permalink
Add deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
rwhitt2049 committed Aug 26, 2023
1 parent 2846596 commit ad8cc38
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 9 deletions.
57 changes: 49 additions & 8 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,18 @@ name: Python package

on:
push:
branches: [ "develop", "feature/*" ]
branches: [ "develop", "feature/*", "hotfix/*"]
pull_request:
branches: [ "develop" ]
branches: [ "develop", "master" ]

jobs:
build:
qa:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
name: TOX on ${{ matrix.python-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -68,6 +66,49 @@ jobs:
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
# dev-install:
deploy:
runs-on: ubuntu-latest
name: Build and publish to PYPI
needs: [qa]
# if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build distributions
run: python -m build
- name: check it
run: ls dist

#
#deploy:
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python
# 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
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
# with:
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}

#name: Python package
#
Expand All @@ -82,7 +123,7 @@ jobs:
# name: tox on ${{ matrix.python-version }}
# runs-on: ubuntu-latest
# env:
# USING_COVERAGE: '3.6,3.8'
# USING_COVERAGE: "3.6,3.8"
#
# strategy:
# matrix:
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311, lint, format
; 3.11: py311, lint, format skipping lint and format for now
3.11: py311


[testenv:py{36, 37, 38, 39, 310, 311}]
description = run unit tests
Expand Down

0 comments on commit ad8cc38

Please sign in to comment.