Skip to content

Commit

Permalink
Modify GitHub release strategy to use sigstore
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarlow83 committed Aug 31, 2024
1 parent 8d7a8f0 commit 5bb6e1c
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,29 +264,45 @@ jobs:

create_release:
name: Create GitHub release
needs: [wheel_sdist_linux, test_linux, test_macos, test_windows]
needs: [upload_pypi]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
permissions:
# Required to create a release
contents: write
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: Create Release
id: create-release
uses: shogo82148/actions-create-release@v1

- name: Upload Assets
uses: shogo82148/actions-upload-release-asset@v1
- name: Sign the dists with Sigstore
uses: sigstore/[email protected]
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: |
./dist/*.whl
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
run: >-
gh release create
'${{ github.ref_name }}'
--repo '${{ github.repository }}'
--notes ""
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
docker_ubuntu:
name: Build Ubuntu-based Docker image
Expand Down

0 comments on commit 5bb6e1c

Please sign in to comment.