Skip to content

Commit 1d3bae2

Browse files
prepare pyPI upload
1 parent 29cb299 commit 1d3bae2

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

‎.github/workflows/publish.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version to publish (e.g. 1.0.0). Leave empty to use the version in pyproject.toml."
8+
required: false
9+
10+
permissions:
11+
id-token: write
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
environment: pypi
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v4
22+
23+
- name: Set version (if provided)
24+
if: ${{ inputs.version != '' }}
25+
run: sed -i "s/^version = .*/version = \"${{ inputs.version }}\"/" pyproject.toml
26+
27+
- name: Show version
28+
run: grep '^version' pyproject.toml
29+
30+
- name: Build package
31+
run: uv build
32+
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "comcheck_api"
7-
version = "0.1.0"
7+
version = "1.0.0"
88
description = "COMcheck Web API Python Client"
99
readme = "README.md"
1010
requires-python = ">=3.12"

0 commit comments

Comments
 (0)