Skip to content

Adding celery scaffold to the project. #31

Adding celery scaffold to the project.

Adding celery scaffold to the project. #31

Workflow file for this run

name: Upload Package to Pypi and TestPyPI
on:
push:
branches: [ main ]
tags:
- '*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dist-requirements.txt
- name: Create Environment Variable For Test PyPI Builds
if: startsWith(github.ref, 'refs/tags/') != true
shell: bash
run: |
echo 'SCM_NO_LOCAL_SCHEME=true' >> $GITHUB_ENV
- name: Check environment variable
run: echo "${{ env.SCM_NO_LOCAL_SCHEME}}"
- name: Build package
run: tox -ebuild
- name: Publish to Test PyPI
if: startsWith(github.ref, 'refs/tags/') != true
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}