new: Publish to PyPi on release

pull/1310/head
Raphaël Vinot 2024-11-11 13:36:26 +01:00
parent 06657719af
commit 5e921b0ca0
1 changed files with 27 additions and 0 deletions

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
on:
release:
types:
- published
name: release
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pymisp
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Install Poetry
run: python -m pip install --upgrade pip poetry
- name: Build artifacts
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1