diff --git a/.github/actions/install-python-and-package/action.yml b/.github/actions/install-python-and-package/action.yml index 20cce452..5ac6658e 100644 --- a/.github/actions/install-python-and-package/action.yml +++ b/.github/actions/install-python-and-package/action.yml @@ -13,7 +13,7 @@ runs: using: "composite" steps: - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ inputs.python-version }} cache: 'pip' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 058268a9..d89e19da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] python-version: ['3.7', '3.8', '3.9'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/install-python-and-package with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/cffconvert.yml b/.github/workflows/cffconvert.yml index 707a71c4..6851c52d 100644 --- a/.github/workflows/cffconvert.yml +++ b/.github/workflows/cffconvert.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out a copy of the repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Check whether the citation metadata from CITATION.cff is valid uses: citation-file-format/cffconvert-github-action@2.0.0 diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index ea9823bb..81b3d58e 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/install-python-and-package - name: Install pandoc using apt run: sudo apt install pandoc diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index 76310246..f85b711e 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -6,7 +6,7 @@ jobs: name: Paper Draft steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build draft PDF uses: openjournals/openjournals-draft-action@master with: diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index d5ffdba1..ec0216e4 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/install-python-and-package - name: Check style against standards using prospector run: prospector diff --git a/.github/workflows/notebooks.yml b/.github/workflows/notebooks.yml index e491bf27..5f11810e 100644 --- a/.github/workflows/notebooks.yml +++ b/.github/workflows/notebooks.yml @@ -19,7 +19,7 @@ jobs: matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ./.github/actions/install-python-and-package with: extras-require: dev,notebooks diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 189b2f38..4d02c173 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,67 +7,44 @@ on: - published jobs: - build_wheel: - name: Build universal wheel + build: + name: Build universal wheel and source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 - uses: ./.github/actions/install-python-and-package with: extras-require: publishing - - - name: Build wheel - run: python setup.py bdist_wheel - - - uses: actions/upload-artifact@v2 + - name: Build wheel and source distribution + run: python -m build + - uses: actions/upload-artifact@v3 with: - path: dist/*.whl - - build_sdist: - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - uses: ./.github/actions/install-python-and-package - with: - extras-require: publishing - - - name: Build sdist - run: python setup.py sdist - - - uses: actions/upload-artifact@v2 - with: - path: dist/*.tar.gz - + path: dist/* upload_test_pypi: - needs: [build_wheel, build_sdist] + needs: [build] runs-on: ubuntu-latest + if: github.event_name == 'workflow_dispatch' steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__ password: ${{ secrets.TEST_PYPI_TOKEN }} repository_url: https://test.pypi.org/legacy/ - upload_pypi: - needs: [build_wheel, build_sdist] + needs: [build] runs-on: ubuntu-latest if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__ diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index f3471054..58f01e05 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -16,7 +16,7 @@ jobs: name: SonarCloud runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - uses: ./.github/actions/install-python-and-package diff --git a/setup.cfg b/setup.cfg index 8e7f3705..9c0c4c3f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,6 +72,7 @@ dev = pandoc myst-parser publishing = + build twine wheel notebooks =