Skip to content

Commit 1e79c62

Browse files
committed
feat: add GitHub Actions workflow for publishing to PyPI
Update version number to 0.2.0
1 parent 5ce7ac8 commit 1e79c62

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Python Package to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger this workflow on version tags like v0.1.0, v1.2.3
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
# This step checks out your repository's code into the runner.
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
# This step sets up a specific Python version.
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install build
26+
pip install twine
27+
# This step installs the build and upload tools.
28+
29+
- name: Build package
30+
run: python -m build
31+
# This builds your package into the dist/ folder.
32+
33+
- name: Publish package
34+
env:
35+
TWINE_USERNAME: __token__
36+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
37+
run: |
38+
twine upload dist/*
39+
# This securely uploads the built package to PyPI using the token from your GitHub Secrets.

pyproject.toml

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

55
[project]
66
name = "DiffCraft"
7-
version = "0.1.1"
7+
version = "0.2.0"
88
authors = [
99

1010
{ name="Saurabh Baral (bvrvl)", email="saurabh@bvrvl.com" },

0 commit comments

Comments
 (0)