Skip to content

Commit

Permalink
Merge pull request #34 from Sanjivani-S/issue29
Browse files Browse the repository at this point in the history
Issue29
  • Loading branch information
Sanjivani-S authored May 26, 2024
2 parents a57e891 + c644a58 commit 1b4a2b2
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
13 changes: 13 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[bumpversion]
current_version = 0.0.1
commit = True
tag = True

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:src/DraftGPT/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"

35 changes: 28 additions & 7 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Build DraftGPT Package
name: Build and Publish DraftGPT Package

on:
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -19,7 +22,14 @@ jobs:
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install setuptools wheel twine bump2version
- name: Bump version
id: bump_version
run: |
bump2version patch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build package
run: |
Expand All @@ -29,9 +39,20 @@ jobs:
- name: Verify build
run: |
ls dist/
- name: Upload build artifacts
uses: actions/upload-artifact@v3
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Create GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: drafgpt-package
path: dist/
tag_name: v${{ steps.bump_version.outputs.new_version }}
release_name: Release ${{ steps.bump_version.outputs.new_version }}
body: |
Release notes for version ${{ steps.bump_version.outputs.new_version }}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ classifiers = [
[project.urls]
Homepage = "https://github.com/Sanjivani-S/DraftGPT"
Issues = "https://github.com/Sanjivani-S/DraftGPT/issues"

[project.dependencies]
requests = "*"
1 change: 1 addition & 0 deletions src/DraftGPT/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"

0 comments on commit 1b4a2b2

Please sign in to comment.