diff --git a/.github/workflows/python-pr.yaml b/.github/workflows/python-pr.yaml index ff6ee2c..1d8c647 100644 --- a/.github/workflows/python-pr.yaml +++ b/.github/workflows/python-pr.yaml @@ -11,10 +11,10 @@ jobs: python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] 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 }} diff --git a/.github/workflows/python-publish.yaml b/.github/workflows/python-publish.yaml index 6757d86..813faba 100644 --- a/.github/workflows/python-publish.yaml +++ b/.github/workflows/python-publish.yaml @@ -6,23 +6,30 @@ on: jobs: deploy: - runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/sedate + + permissions: + id-token: write + 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' + python-version: "3.x" + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python -m build -s -w - twine upload dist/* + pip install build + + - name: Build package distributions + run: python -m build -s -w + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/python-tox.yaml b/.github/workflows/python-tox.yaml index b7e25cf..c966fa2 100644 --- a/.github/workflows/python-tox.yaml +++ b/.github/workflows/python-tox.yaml @@ -11,7 +11,7 @@ jobs: python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Get branch name (merge) if: github.event_name != 'pull_request' @@ -28,7 +28,7 @@ jobs: >> $GITHUB_ENV - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }}