Skip to content

Commit c3fb4ee

Browse files
committed
add gh action to release in pypi
1 parent abf6eb3 commit c3fb4ee

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Crowdsec Service API SDK release"
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
- prereleased
8+
9+
jobs:
10+
publish-on-pypi:
11+
12+
name: Publish to PyPI
13+
runs-on: ubuntu-latest
14+
environment:
15+
name: pypi
16+
url: https://pypi.org/p/crowdsec-service-api-sdk
17+
permissions:
18+
id-token: write
19+
needs: [ create-release ]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-tags: true
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build
33+
- name: Build package
34+
run: python -m build
35+
- name: Publish package to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)