From 5e921b0ca07f111615da687ac3118c9c3f75a68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 11 Nov 2024 13:36:26 +0100 Subject: [PATCH] new: Publish to PyPi on release --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e3238b6 --- /dev/null +++ b/.github/workflows/release.yml @@ -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