Skip to content

Commit 5546af8

Browse files
yaooqinnCopilot
andcommitted
Add PyPI publish workflow via GitHub Actions
Uses trusted publishing (OIDC) — no API token needed. Triggers on GitHub release creation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b710878 commit 5546af8

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-publish:
9+
name: Build and publish to PyPI
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for trusted publishing
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install build tools
22+
run: pip install build
23+
24+
- name: Build package
25+
run: python -m build
26+
27+
- name: Publish to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
long_description=open("README.md").read(),
88
long_description_content_type="text/markdown",
99
author="Apache Spark Contributors",
10+
url="https://github.com/yaooqinn/spark-history-cli",
1011
license="Apache-2.0",
12+
project_urls={
13+
"Source": "https://github.com/yaooqinn/spark-history-cli",
14+
"Issues": "https://github.com/yaooqinn/spark-history-cli/issues",
15+
},
1116
packages=find_packages(),
1217
package_data={
1318
"spark_history_cli": ["skills/*.md"],

0 commit comments

Comments
 (0)