From 493b800b4c95bc681226866248b7eb498a23d9fe Mon Sep 17 00:00:00 2001 From: riyadhrazzaq Date: Sun, 27 Jun 2021 21:43:23 +0600 Subject: [PATCH] dev ops --- .github/workflows/publish.yml | 26 +++++++++++++++++++ .github/workflows/test.yml | 2 +- .../{pypi_publish.yml => test_publish.yml} | 0 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml rename .github/workflows/{pypi_publish.yml => test_publish.yml} (100%) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..63d8ab4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,26 @@ +name: Upload Python Package + +on: + release: + types: [released] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + - 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@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index be9f648..9f0be14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,4 +24,4 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with unittest run: | - python -m unittest discover -s tests/src \ No newline at end of file + python -m unittest discover -s tests/src diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/test_publish.yml similarity index 100% rename from .github/workflows/pypi_publish.yml rename to .github/workflows/test_publish.yml