Skip to content

Commit 336fc5f

Browse files
committed
chore: Release workflow on pypi
1 parent 4f334c3 commit 336fc5f

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
on:
2+
push:
3+
tags: [ 'v?*.*.*' ]
4+
name: release
5+
6+
jobs:
7+
pypi-publish:
8+
name: upload release to PyPI
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: ["3.12"]
14+
15+
# Specifying a GitHub environment is optional, but strongly encouraged
16+
environment: release
17+
permissions:
18+
# IMPORTANT: this permission is mandatory for trusted publishing
19+
id-token: write
20+
steps:
21+
- uses: actions/checkout@v3
22+
- run: git fetch origin develop
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install Poetry
28+
uses: snok/install-poetry@v1
29+
with:
30+
version: 1.5.1
31+
virtualenvs-create: true
32+
virtualenvs-in-project: true
33+
installer-parallel: true
34+
- name: Load cached venv
35+
id: cached-poetry-dependencies
36+
uses: actions/cache@v3
37+
with:
38+
path: .venv
39+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
40+
- name: Install dependencies
41+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
42+
run: poetry install --no-interaction --no-root
43+
- name: Test with pytest
44+
run: |
45+
source .venv/bin/activate
46+
pytest
47+
- name: Poetry build
48+
run: |
49+
source .venv/bin/activate
50+
poetry build
51+
- name: Publish package distributions to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1

docs/releases/2.2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
In this release, we conducted a general cleanup and refactoring across various modules to enhance code readability and maintainability. We improved exception handling and reduced code redundancy.
88

9-
As a result, we achieved a **~1.8x** faster setup in our performance tests and significantly simplified the callback machinery.
9+
As a result, we achieved a **~2.2x** faster setup in our performance tests and significantly simplified the callback machinery.
1010

1111

1212
### Check of unreachable and non-final states

0 commit comments

Comments
 (0)