Skip to content

Commit

Permalink
Add attestation step to publish workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Jun 21, 2024
1 parent 89ea7f4 commit 19c4992
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: read
needs: [framework-tests, observability-charm-tests, hello-charm-tests]
steps:
- uses: actions/checkout@v4
Expand All @@ -25,5 +27,9 @@ jobs:
run: pip install wheel build
- name: Build
run: python -m build
- name: Attest build provenance
uses: actions/attest-build-provenance@v1.3.2
with:
subject-path: 'dist/*'
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 9 additions & 5 deletions .github/workflows/test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,21 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: read
needs: [framework-tests, observability-charm-tests, hello-charm-tests]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install wheel
run: pip install wheel
- name: Install build dependencies
run: pip install wheel build
- name: Build
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Attest build provenance
uses: actions/attest-build-provenance@v1.3.2
with:
subject-path: 'dist/*'
- name: Publish to test.pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down

0 comments on commit 19c4992

Please # to comment.