1+ # Copyright 2024 JanusGraph Authors
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ name : janusgraph-python-deployment
16+
17+ on :
18+ release :
19+ types :
20+ - published
21+
22+ jobs :
23+ build :
24+
25+ runs-on : ubuntu-latest
26+
27+ steps :
28+ - uses : actions/checkout@v3
29+ - name : Set up Python 3.9
30+ uses : actions/setup-python@v3
31+ with :
32+ python-version : " 3.9"
33+ - name : Install dependencies
34+ run : |
35+ python -m pip install --upgrade pip
36+ pip install build
37+ - name : Pack
38+ run : |
39+ python -m build
40+ - name : Store the distribution package
41+ uses : actions/upload-artifact@v3
42+ with :
43+ name : python-package-distribution
44+ path : dist/
45+
46+ pypi-publish :
47+ name : Upload release to PyPI
48+ needs : build
49+ runs-on : ubuntu-latest
50+ environment :
51+ name : pypi
52+ url : https://pypi.org/p/janusgraphpython
53+ permissions :
54+ id-token : write
55+ steps :
56+ - name : Download distribution package
57+ uses : actions/download-artifact@v3
58+ with :
59+ name : python-package-distribution
60+ path : dist/
61+ - name : Publish package distribution to PyPI
62+ uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments