diff --git a/.github/workflows/python-app.yml b/.github/workflows/application-build.yml similarity index 71% rename from .github/workflows/python-app.yml rename to .github/workflows/application-build.yml index fb1049d..9375fbb 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/application-build.yml @@ -42,23 +42,3 @@ jobs: - name: Test with pytest run: | pytest - - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* \ No newline at end of file diff --git a/.github/workflows/application-deploy.yml b/.github/workflows/application-deploy.yml new file mode 100644 index 0000000..3453fc7 --- /dev/null +++ b/.github/workflows/application-deploy.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + workflow_dispatch: +# uncomment the below code to enable actions automatically on main for deployment. +# push: +# branches: +# - main +# uncomment the below code to enable actions on PR automatically on branch. +# pull_request: +# branches: +# - main + +permissions: + contents: read + +jobs: + + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: | + python setup.py sdist bdist_wheel + twine upload dist/* \ No newline at end of file