Skip to content

Commit

Permalink
Add dependabot and adjust permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Jul 14, 2024
1 parent 4ea95bd commit a9bd658
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch
3 changes: 3 additions & 0 deletions .github/workflows/contract.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Test Contract

permissions:
contents: read

on:
push:
branches: [ main ]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Linting

permissions:
contents: read

on:
# TODO adjust once we do PR
push:
branches: [ main ]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: publish distributions

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
publish:
name: Publish Python distribution to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
environment:
name: publish-package

steps:
# - name: Collect built artifacts
# ...

- name: Generate artifact attestation for sdist and wheels
uses: actions/attest-build-provenance@<full action commit SHA> # vX.Y.Z
with:
subject-path: "dist/tansu*"

- name: Verify artifact attestation
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
for artifact in dist/*; do
echo "# ${artifact}"
gh attestation verify "${artifact}" --repo ${{ github.repository }}
done
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@<full action commit SHA> # vX.Y.Z
with:
print-hash: true

0 comments on commit a9bd658

Please sign in to comment.