diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..bc3dbdb --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,33 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' # v1.0.0 のようなタグで実行 + +jobs: + build-and-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - 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@v1.8.11 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/Makefile b/Makefile index 3e5bb5e..152c1f3 100644 --- a/Makefile +++ b/Makefile @@ -19,3 +19,5 @@ pre-commit-refresh: pre-commit autoupdate @echo "🚀 Running all pre-commit hooks..." pre-commit run --all-files +build-pypi: + python -m build diff --git a/pyproject.toml b/pyproject.toml index 67fc597..91582f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,12 @@ [project] name = "fireblocks-cli" -version = "0.1.3" +version = "0.1.4" description = "An unofficial CLI for managing Fireblocks services." authors = [{ name = "Kamon Shohei" }] readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.11" dependencies = [ - "typer[all]", - "pyyaml" + "typer[all]>0.15.0", ] [project.scripts] diff --git a/requirements-dev.txt b/requirements-dev.txt index 4a49f9a..cb9e066 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,3 +3,5 @@ bump-my-version black reuse pre-commit +build +twine