Skip to content

Commit 0837d6a

Browse files
authored
Update and rename pypipublish.yml to newpypipublish.yml
1 parent c78a42c commit 0837d6a

File tree

1 file changed

+47
-1
lines changed

1 file changed

+47
-1
lines changed

.github/workflows/pypipublish.yml renamed to .github/workflows/newpypipublish.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
name: thermoflex
1010

1111
on:
12-
push:
12+
pull_request:
1313
branches:
1414
- main
1515

@@ -69,3 +69,49 @@ jobs:
6969
uses: pypa/gh-action-pypi-publish@release/v1
7070
with:
7171
packages-dir: python-serial/dist/
72+
73+
gh-release-publish:
74+
runs-on: ubuntu-latest
75+
needs:
76+
- release-build
77+
permissions:
78+
# IMPORTANT: this permission is mandatory for trusted publishing
79+
contents: write
80+
id-token: write
81+
82+
steps:
83+
- name: Retrieve release distributions
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: release-dists
87+
path: python-serial/dist/
88+
89+
- name: Sign the dists with Sigstore
90+
uses: sigstore/[email protected]
91+
with:
92+
inputs: >-
93+
./python-serial/dist/*.tar.gz
94+
./python-serial/dist/*.whl
95+
96+
- name: Create GitHub Release
97+
env:
98+
GITHUB_TOKEN: ${{ github.token }}
99+
run: >-
100+
gh release create
101+
"$GITHUB_REF_NAME"
102+
--repo "$GITHUB_REPOSITORY"
103+
--notes ""
104+
105+
- name: Upload artifact signatures to GitHub Release
106+
env:
107+
GITHUB_TOKEN: ${{ github.token }}
108+
# Upload to GitHub Release using the `gh` CLI.
109+
# `dist/` contains the built packages, and the
110+
# sigstore-produced signatures and certificates.
111+
run: >-
112+
gh release upload
113+
"$GITHUB_REF_NAME" dist/**
114+
--repo "$GITHUB_REPOSITORY"
115+
116+
117+

0 commit comments

Comments
 (0)