-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.15 KB
/
github-make-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
on:
workflow_call:
jobs:
github-release:
name: Sign packages and upload to GitHub releases
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download dists from artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Sign dists
uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --notes ""
- name: Upload artifact signatures to GitHub release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
GITHUB_TOKEN: ${{ github.token }}
run: gh release upload "$GITHUB_REF_NAME" dist/** --repo "$GITHUB_REPOSITORY"