diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8199536..898121e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: - "**.py" - pyproject.toml - ".github/workflows/main.yml" + - ".pre-commit-config.yaml" - "!docs/**" workflow_dispatch: diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index f104e16..77c5179 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -13,8 +13,6 @@ permissions: jobs: publish: runs-on: ubuntu-latest - outputs: - hashes: ${{ steps.hash.outputs.hashes }} steps: - uses: actions/checkout@v4 # use fetch --all for setuptools_scm to work @@ -39,13 +37,6 @@ jobs: with: subject-path: "dist/commit_check*" - - name: Generate subject - id: hash - run: | - cd dist - HASHES=$(sha256sum commit_check* | base64 -w0) - echo "hashes=$HASHES" >> "$GITHUB_OUTPUT" - - name: Publish package to TestPyPI if: github.event_name == 'workflow_dispatch' && github.repository == 'commit-check/commit-check' env: @@ -60,16 +51,3 @@ jobs: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: twine upload dist/commit_check* - - provenance: - needs: ['publish'] - permissions: - actions: read # To read the workflow path. - id-token: write # To sign the provenance. - contents: write # To add assets to a release. - # Can't pin with hash due to how this workflow works. - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0 - with: - base64-subjects: ${{ needs.publish.outputs.hashes }} - upload-assets: true # Optional: Upload to a new release - continue-on-error: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 467425b..316589e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,23 +16,23 @@ repos: - id: name-tests-test - id: requirements-txt-fixer - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 args: [--max-line-length=100, --ignore=E501] exclude: ^commit_check/__init__.py - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.10.0 + rev: v1.11.1 hooks: - id: mypy - additional_dependencies: [types-all] + additional_dependencies: [types-PyYAML] exclude: ^testing/resources/ - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell - repo: https://github.com/commit-check/commit-check - rev: v0.7.4 + rev: v0.8.0 hooks: - id: check-message # - id: check-branch # uncomment if you need.