8000 ci: upload to pypi on github release by corytodd · Pull Request #77 · xlwings/jsondiff · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ci: upload to pypi on github release #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 24, 2024
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
32 changes: 32 additions & 0 deletions .github/workflows/python_publish.yml
10000
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload Python Package

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ target/
.idea

.hypothesis/

# Ignore auto-generated _version
/jsondiff/_version.py
3 changes: 1 addition & 2 deletions jsondiff/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
__version__ = '2.0.0'

import sys
import json
import yaml
Expand All @@ -9,6 +7,7 @@

from .symbols import *
from .symbols import Symbol
from ._version import __version__

# rules
# - keys and strings which start with $ (or specified escape_str) are escaped to $$ (or escape_str * 2)
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=43.0.0", "wheel"]
requires = ["setuptools>=64.0.0", "setuptools_scm>=8", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -30,8 +30,10 @@ include = ["jsondiff*"]
exclude = ["tests*"]

[tool.setuptools.dynamic]
version = {attr = "jsondiff.__version__"}
dependencies = {file=["requirements.txt"]}

[tool.setuptools_scm]
version_file = "jsondiff/_version.py"

[tool.setuptools.dynamic.optional-dependencies]
dev = {file=["requirements-dev.txt"]}
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
hypothesis
pytest
setuptools-scm
build
Loading
0