Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# include git history for setuptools-scm
fetch-depth: 20
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v3
- name: build
run: |
python -m pip install build
python -m build
- name: dump result
run: |
ls -alh dist/
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/*
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
skip-existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "smart_pinyin"
version = "0.4.6"
description = "Smart Chinese-to-Pinyin converter."

authors = [
Expand All @@ -22,9 +21,13 @@ dependencies = [

readme = "README.md"

dynamic = ["version"]

[project.urls]
Homepage = "https://github.com/xospc/python-smart-pinyin"

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

[tool.setuptools_scm]