Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 27 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
name: Create Release on Merge
name: Release

on:
pull_request:
types: [closed]
push:
branches:
- main

jobs:
release:
if: >
github.event.pull_request.merged == true &&
github.base_ref == 'main' &&
github.head_ref == 'develop'
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest

# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
tag_name: ${{ github.event.pull_request.title }}
release_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
python-version: ${{ matrix.python-version }}

- name: Install dependencies
shell: bash
run: pip install -r requirements_dev.txt

- name: Build the project
shell: bash
run: python -m build .

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading