diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1de942..4d49f39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,8 +10,6 @@ on: branches: [ master ] registry_package: types: [published] - release: - types: [created, published, released] workflow_dispatch: jobs: @@ -62,15 +60,4 @@ jobs: run: | ./run_tests.sh - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 - - name: Create Package - shell: bash - run: | - python -m pip install build - python -m build --sdist --wheel - - name: Publish/Release Package - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + uses: codecov/codecov-action@v3 \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9fcc9ed --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Publish + +on: + release: + types: + - created + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: 3.11 + - name: Install Dependencies + shell: bash + run: pip install build + - name: Create Package + shell: bash + run: python -m build --sdist --wheel + - name: Publish/Release Package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file