Commit e8cf982 1 parent 6898807 commit e8cf982 Copy full SHA for e8cf982
File tree 2 files changed +32
-11
lines changed
2 files changed +32
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python Package to Pypi.org
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ permissions :
8
+ id-token : write
9
+
10
+ jobs :
11
+ pypi-publish :
12
+ name : Release Python Package on Pypi.org
13
+ runs-on : ubuntu-latest
14
+ environment :
15
+ name : pypi
16
+ url : https://pypi.org/p/djangorestframework-gis
17
+ permissions :
18
+ id-token : write
19
+ steps :
20
+ - uses : actions/checkout@v4
21
+ - name : Set up Python
22
+ uses : actions/setup-python@v5
23
+ with :
24
+ python-version : ' 3.10'
25
+ - name : Install dependencies
26
+ run : |
27
+ pip install -U pip
28
+ pip install build
29
+ - name : Build package
30
+ run : python -m build
31
+ - name : Publish package distributions to PyPI
32
+
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
import os
3
- import sys
4
3
5
4
from setuptools import find_packages , setup
6
5
7
6
from rest_framework_gis import get_version
8
7
9
- if sys .argv [- 1 ] == 'publish' :
10
- os .system ("python setup.py sdist bdist_wheel" )
11
- os .system ("twine upload -s dist/*" )
12
- os .system ("rm -rf dist build" )
13
- args = {'version' : get_version ()}
14
- print ("You probably want to also tag the version now:" )
15
- print (" git tag -a %(version)s -m 'version %(version)s'" % args )
16
- print (" git push --tags" )
17
- sys .exit ()
18
-
19
8
here = os .path .abspath (os .path .dirname (__file__ ))
20
9
21
10
# Get the long description from the README file
You can’t perform that action at this time.
0 commit comments