diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16fb24e..1864bc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,11 @@ # 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: Validation +name: Release -on: - push: - branches: - - master - tags: - - v** +on: + release: + types: [published] permissions: contents: read @@ -33,4 +30,4 @@ jobs: python -m pip install -e .[dev] - name: publish - run: invoke publish_test + run: invoke publish diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml new file mode 100644 index 0000000..832ab9c --- /dev/null +++ b/.github/workflows/release_test.yml @@ -0,0 +1,37 @@ +# 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: Release + +on: + push: + tags: + - test** + +permissions: + contents: read + +jobs: + release: + + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -e . + python -m pip install -e .[dev] + + - name: build + run: python setup.py bdist_wheel + + - name: publish + run: python -m twine upload --repository testpypi dist/* diff --git a/requirements-dev.txt b/requirements-dev.txt index 818aba1..5655128 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,3 +6,4 @@ pytest pytest-cov coverage flake8 +invoke