File tree Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Expand file tree Collapse file tree 3 files changed +60
-1
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ - workflow_dispatch
3
+
4
+ name : Release packages
5
+
6
+ jobs :
7
+ build :
8
+ name : Create the package
9
+ runs-on : ubuntu-latest
10
+ environment : github_release
11
+ steps :
12
+ - uses : actions/checkout@v2
13
+
14
+ - uses : actions/setup-python@v2
15
+ with :
16
+ python-version : 3.9
17
+
18
+ - id : sdist
19
+ run : python setup.py sdist
20
+
21
+ - id : version
22
+ run : |
23
+ printf "::set-output name=version::%s\n" $(python -c "import runpy; print(runpy.run_path('dict2xml/__init__.py')['VERSION'])")
24
+ printf "::set-output name=versiondash::%s\n" $(python -c "import runpy; print(runpy.run_path('dict2xml/__init__.py')['VERSION'].replace('.', '-'))")
25
+
26
+ - id : package
27
+ run : >
28
+ printf "::set-output name=package::dict2xml-${{ steps.version.outputs.version}}.tar.gz"
29
+
30
+ - id : create_release
31
+ uses : actions/create-release@v1
32
+ env :
33
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+
35
+ with :
36
+ tag_name : " release-${{ steps.version.outputs.version }}"
37
+ release_name : dict2xml ${{ steps.version.outputs.version }}
38
+ body : " https://github.com/delfick/python-dict2xml#release-${{ steps.version.outputs.versiondash }}"
39
+ draft : false
40
+ prerelease : false
41
+
42
+ - id : upload-release-asset
43
+ uses : actions/upload-release-asset@v1
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ with :
47
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
48
+ asset_path : " dist/${{ steps.package.outputs.package }}"
49
+ asset_name : ${{ steps.package.outputs.package }}
50
+ asset_content_type : application/tar+gzip
51
+
52
+ - uses : pypa/gh-action-pypi-publish@v1.4.1
53
+ with :
54
+ user : __token__
55
+ password : ${{ secrets.PYPI_API_TOKEN_CORE }}
56
+ packages_dir : dist
Original file line number Diff line number Diff line change 1
1
from dict2xml .logic import Converter , Node
2
2
3
+ VERSION = "1.7.1"
4
+
3
5
4
6
def dict2xml (data , * args , ** kwargs ):
5
7
"""Return an XML string of a Python dict object."""
Original file line number Diff line number Diff line change
1
+ from dict2xml import VERSION
1
2
from setuptools import setup
2
3
3
4
# fmt: off
4
5
5
6
# Setup the project
6
7
setup (
7
8
name = "dict2xml"
8
- , version = '1.7.0'
9
+ , version = VERSION
9
10
, packages = ['dict2xml' ]
10
11
11
12
, python_requires = ">= 3.5"
You can’t perform that action at this time.
0 commit comments