-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify GitHub release strategy to use sigstore
- Loading branch information
Showing
1 changed file
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|