-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 1.64 KB
/
release.yml
File metadata and controls
74 lines (63 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Release
on:
push:
branches: ["main"]
env:
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
PYTHONUTF8: 1
permissions:
contents: write
id-token: write
packages: write
jobs:
versioning:
name: Update Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/tinysemver@v3.0.0
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
pyproject.toml:^version = "(\d+\.\d+\.\d+)"
setup.py: version="(\d+\.\d+\.\d+)"
affine_gaps.py:^__version__ = "(\d+\.\d+\.\d+)"
dry-run: "false"
push: "true"
create-release: "true"
github-token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
build_and_publish:
name: Build and Publish to PyPI
runs-on: ubuntu-latest
needs: versioning
environment:
name: pypi
url: https://pypi.org/p/affine-gaps
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
ref: "main"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
print-hash: true