-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pypi] Add github action for pypi publishing (#7)
- Loading branch information
Showing
4 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pypi-publish: | ||
name: upload release to PyPI | ||
runs-on: ubuntu-latest | ||
environment: release | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Setup pdm | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Build package | ||
run: pdm build | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ authors = [ | |
maintainers = [ | ||
{name = "Modular Inc", email = "[email protected]"} | ||
] | ||
description = "Stacked PRs for GitHub" | ||
version = "1.0" | ||
description = "Stacked PRs for GitHub." | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.8" | ||
|
@@ -23,7 +22,8 @@ classifiers = [ | |
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python", | ||
] | ||
dependencies = [] | ||
# Version is dynamically set by pdm by the SCM version | ||
dynamic = ["version"] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/modularml/stack-pr" | ||
|
@@ -35,13 +35,16 @@ stack-pr = "stack_pr.cli:main" | |
|
||
[tool.pdm] | ||
distribution = true | ||
source = "scm" | ||
fallback_version = "0.0.0" | ||
|
||
[tool.pixi.project] | ||
channels = ["conda-forge"] | ||
platforms = ["osx-arm64", "osx-64", "linux-64", "linux-aarch64"] | ||
|
||
[tool.pixi.pypi-dependencies] | ||
stack-pr = { path = ".", editable = true } | ||
pdm = ">=2.17.1,<2.18" | ||
|
||
[tool.pixi.tasks] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
from .stack_pr import main | ||
from .cli import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters