diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de4534b..960b95e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,16 +12,21 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false + - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: 3.x - - uses: pre-commit/action@v3.0.1 - - uses: pre-commit-ci/lite-action@v1.1.0 + - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 + - uses: pre-commit-ci/lite-action@062bca0919bc9d6e66755cc05074b70c77e111fc # v1.2.0 if: always() unittest: @@ -37,11 +42,9 @@ jobs: - py314 steps: - name: Checkout code - uses: actions/checkout@v6 - - uses: prefix-dev/setup-pixi@v0.9.3 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - run-install: false - post-cleanup: false + persist-credentials: false - name: Apply workarounds run: | # Workaround for https://github.com/prefix-dev/pixi/issues/3762 @@ -49,8 +52,9 @@ jobs: rm pyproject.toml.bak # Show any changes git diff - - uses: prefix-dev/setup-pixi@v0.9.3 + - uses: prefix-dev/setup-pixi@ad1da6449d9e506fd127fd67ab2d054a769f6a94 # v0.11.2 with: + pixi-version: v0.82.0 cache: false environments: ${{ matrix.python-version }} - name: Run pytest diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 012cef6..a94816b 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -2,22 +2,20 @@ name: Publish Python 🐍 distribution 📦 to PyPI on: push +permissions: + contents: read + jobs: build: name: Build distribution 📦 runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/intercede - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: persist-credentials: false - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: "3.14" - name: Installing dependencies @@ -34,5 +32,26 @@ jobs: python -m readme_renderer README.md -o /tmp/README.html - name: Build a binary wheel and a source tarball run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: python-package-distributions + path: dist/ + + publish: + name: Publish distribution 📦 to PyPI + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/intercede + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download the distribution packages + uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + with: + name: python-package-distributions + path: dist/ - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 2fba604..af888b4 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -14,7 +14,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 with: token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} release-type: simple diff --git a/renovate.json b/renovate.json index 437d827..0877e17 100644 --- a/renovate.json +++ b/renovate.json @@ -1,7 +1,8 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended" + "config:recommended", + "helpers:pinGitHubActionDigests" ], "minimumReleaseAge": "7 days", "enabledManagers": [