Skip to content

Commit 9bc9d75

Browse files
committed
Add publish CI
1 parent d46c5cc commit 9bc9d75

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-release:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Build distributions
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install build
24+
python -m build
25+
- name: Upload distributions
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: slither-lsp-dists
29+
path: dist/
30+
31+
publish:
32+
runs-on: ubuntu-latest
33+
environment: release
34+
permissions:
35+
id-token: write # For trusted publishing + codesigning.
36+
contents: write # For attaching signing artifacts to the release.
37+
needs:
38+
- build-release
39+
steps:
40+
- name: fetch dists
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: slither-lsp-dists
44+
path: dist/
45+
46+
- name: publish
47+
uses: pypa/[email protected]
48+
49+
- name: sign
50+
uses: sigstore/[email protected]
51+
with:
52+
inputs: ./dist/*.tar.gz ./dist/*.whl
53+
release-signing-artifacts: true

0 commit comments

Comments
 (0)