Skip to content

Commit

Permalink
feat: menambahkan action untuk upload package
Browse files Browse the repository at this point in the history
Signed-off-by: slowy07 <[email protected]>
  • Loading branch information
slowy07 committed Jan 24, 2024
1 parent 35d195a commit 9b8e281
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Upload Python Package

on:
release:
types: [release]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,6 @@ next-env.d.ts

# hasil cache dari mypy
.mypy_cache

# cache dari dist
dist
67 changes: 67 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
[project]
name = "OpenSeriesBellshade"
version = "1.0.0"
dynamic = [
"dependencies"
]
description = "library untuk membantu temen-temen dalam perhitungan matematika"
readme = "README.md"
requires-python = ">=3.11.6"
keywords = [
"OpenSeries",
"openseries"
]
license = {text = "MIT"}
authors = [
{name = "bellshade wpu kelas terbuka"},
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[tool]
[tool.setuptools.packages.find]
include = ["OpenSeries*"]
exclude = ["example"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.distutils.bdist_wheel]
universal = true

[project.urls]
Homepage = "https://github.com/bellshade/OpenSeries"

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.bumpver]
current_version = "1.0.0"
version_pattern = "MAJOR.MINOR.PATCH"
commit_message = "bump version {old_version} -> {new_version}"
commit = true
tag = true
push = true

[tool.bumpver.file_patterns]
"pyproject.toml" = [
'current_version = "{version}"',
]
"setup.py" = [
"{version}",
"{pep440_version}",
]
"README.md" = [
"{version}",
"{pep440_version}",
]

0 comments on commit 9b8e281

Please sign in to comment.