Skip to content

Commit 46c0119

Browse files
committed
Publish to PyPi workflow
1 parent b13d9ca commit 46c0119

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/pypi-release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build-and-publish:
12+
runs-on: ubuntu-latest
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/malifiscan
16+
permissions:
17+
id-token: write # Required for OIDC trusted publishing
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v3
25+
with:
26+
enable-cache: true
27+
cache-dependency-glob: "uv.lock"
28+
29+
- name: Set up Python
30+
run: uv python install
31+
32+
- name: Install dependencies
33+
run: uv sync --dev
34+
35+
- name: Build package
36+
run: uv build
37+
38+
- name: Verify package
39+
run: uv run twine check dist/*
40+
41+
- name: Publish to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1
43+
with:
44+
verbose: true

0 commit comments

Comments
 (0)