diff --git a/.github/workflows/PullBuildChecking.yml b/.github/workflows/PullBuildChecking.yml deleted file mode 100644 index 35ad8b6..0000000 --- a/.github/workflows/PullBuildChecking.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python Package Testing - -on: - pull_request: - types: - - "opened" - - "reopened" - - "edited" - - "synchronize" - push: - -jobs: - build: - - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - python-version: ["3.7" ,"3.8", "3.9", "3.10", "3.11", "3.12.0-alpha.4"] - os: [ubuntu-latest, macOS-latest, windows-latest] - - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: make - - name: Test with Build - run: make build \ No newline at end of file diff --git a/.github/workflows/Python-Publish.yml b/.github/workflows/Python-Publish.yml new file mode 100644 index 0000000..9f3d4b7 --- /dev/null +++ b/.github/workflows/Python-Publish.yml @@ -0,0 +1,37 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python Package Deploy + +on: + pull_request: + types: + - "opened" + - "reopened" + - "edited" + - "synchronize" + push: + release: + types: [published] + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11.0' + - name: Install dependencies + run: make + - name: Build package + run: make build + - name: Publish package + if: github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@5d1679fa6b895587c6eb10c3fe82205b440a580e + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/PythonPublish.yml b/.github/workflows/PythonPublish.yml deleted file mode 100644 index ce1d12e..0000000 --- a/.github/workflows/PythonPublish.yml +++ /dev/null @@ -1,37 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.11.0' - - name: Install dependencies - run: make - - name: Build package - run: make build - - name: Publish package - uses: pypa/gh-action-pypi-publish@5d1679fa6b895587c6eb10c3fe82205b440a580e - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }}