Skip to content

Commit

Permalink
ci: publish to TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee committed Jun 26, 2024
1 parent ee9e895 commit c10bd7e
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 14 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,22 @@ on:
push:
branches: ["main"]
paths:
- "src/**"
- "test/**"
- "**.py"
- "**.gpx"
- "**.sh"
- "pyproject.toml"
- ".github/workflows/ci.yml"
pull_request:
branches: ["main"]
paths:
- "src/**"
- "test/**"
- "**.py"
- "**.gpx"
- "**.sh"
- "pyproject.toml"
- ".github/workflows/ci.yml"

permissions:
Expand All @@ -38,11 +44,12 @@ jobs:
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
# - name: Store the distribution packages
# uses: actions/upload-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
retention-days: 1

test-cli:
runs-on: ${{ matrix.os }}
Expand All @@ -63,3 +70,27 @@ jobs:
run: |
chmod +x ./test/cli.test.sh
./test/cli.test.sh
publish-to-testpypi:
name: Publish 🐍 TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: test.pypi.org
url: https://test.pypi.org/p/ezon-gpx

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
name: python-package-distributions
path: dist/
retention-days: 1

publish-to-pypi:
name: Publish to PyPI
Expand Down
36 changes: 27 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "ezon-gpx"
version = "1.0.0"
authors = [
{name = "Uiolee"},
]
authors = [{ name = "Uiolee" }]
maintainers = [{ name = "Uiolee" }]
description = "convert Ezon gpx files."
keywords = ["ezon", "gpx", "xml", "running_page"]
readme = "README.md"
license = {text = "MPL-2.0"}
license = { file = "LICENSE" }

classifiers = [
"Development Status :: 4 - Beta",

"Topic :: Text Processing :: Markup :: XML",
"Topic :: File Formats",
"Topic :: Utilities",

"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",

"Natural Language :: English",

"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",

"Programming Language :: Python :: 3.11",
]

[project.urls]
Homepage = "https://github.com/uiolee/ezon-gpx"
Issues = "https://github.com/uiolee/ezon-gpx/issues"

[project.scripts]
ezon-gpx = "cli:cli"

0 comments on commit c10bd7e

Please sign in to comment.