Skip to content

Merge pull request #1063 from fractal-analytics-platform/1061_apply_r… #49

Merge pull request #1063 from fractal-analytics-platform/1061_apply_r…

Merge pull request #1063 from fractal-analytics-platform/1061_apply_r… #49

Workflow file for this run

name: Publish package to PyPI
on:
push:
tags:
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+[a-c][0-9]+"
- "[0-9]+.[0-9]+.[0-9]+alpha[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+beta[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
permissions: {}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-24.04
environment: pypi
permissions:
# Required for trusted publishing on PyPI
# see https://docs.pypi.org/trusted-publishers/
id-token: write
# Required for creating GitHub releases
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.11"
- name: Build package
run: |
python -m pip install hatch
python -m hatch build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create "${GITHUB_REF_NAME}" ./dist/* --generate-notes