From 8031d0ec6ff3a9215fd2dd9761e194cb294850cb Mon Sep 17 00:00:00 2001 From: nsheff Date: Tue, 13 Feb 2024 20:35:01 -0500 Subject: [PATCH] update actions --- .github/workflows/python-publish.yml | 15 ++++++++------- .github/workflows/run-pytest.yml | 14 ++++++-------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4e1ef42..e54ad87 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -11,11 +11,13 @@ jobs: deploy: runs-on: ubuntu-latest - + name: upload release to PyPI + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install dependencies @@ -23,9 +25,8 @@ jobs: python -m pip install --upgrade pip pip install setuptools wheel twine - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml index 0b3ce95..b37747c 100644 --- a/.github/workflows/run-pytest.yml +++ b/.github/workflows/run-pytest.yml @@ -1,31 +1,29 @@ name: Run pytests on: - push: - branches: [dev] pull_request: - branches: [master] + branches: [master, dev] jobs: pytest: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.8", "3.11"] os: [ubuntu-latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install dev dependancies + - name: Install dev dependencies run: if [ -f requirements/requirements-dev.txt ]; then pip install -r requirements/requirements-dev.txt; fi - - name: Install test dependancies + - name: Install test dependencies run: if [ -f requirements/requirements-test.txt ]; then pip install -r requirements/requirements-test.txt; fi - name: Install package