Skip to content

Commit 6200b31

Browse files
committed
chore(ci): add action to publish to pypi
1 parent 9c27431 commit 6200b31

File tree

9 files changed

+207
-15
lines changed

9 files changed

+207
-15
lines changed

.fossa.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 3
2+
3+
server: https://app.fossa.com
4+
5+
project:
6+
id: github.com/openfga/python-sdk
7+
name: github.com/openfga/python-sdk
8+
link: fga.dev
9+
url: github.com/openfga/python-sdk

.github/workflows/main.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,42 @@ jobs:
9090
- name: Flake8 on unit test
9191
run: python -m flake8 --ignore E501 test
9292

93-
create-release:
93+
publish:
9494
runs-on: ubuntu-latest
9595
if: startsWith(github.ref, 'refs/tags/v')
9696
needs: [test, fossa, snyk]
9797

98+
steps:
99+
- uses: actions/checkout@v3
100+
- name: Set up Python
101+
uses: actions/setup-python@v4
102+
with:
103+
python-version: 3.10
104+
cache: 'pip'
105+
cache-dependency-path: |
106+
**/setup.cfg
107+
**/requirements*.txt
108+
- name: Install dependencies
109+
run: |
110+
python -m pip install --upgrade pip
111+
python -m pip install -r test-requirements.txt
112+
113+
- name: Build package
114+
run: |
115+
pip install setuptools wheel
116+
python setup.py sdist bdist_wheel
117+
118+
- name: Publish package
119+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
120+
with:
121+
user: __token__
122+
password: ${{ secrets.PYPI_API_TOKEN }}
123+
124+
create-release:
125+
runs-on: ubuntu-latest
126+
if: startsWith(github.ref, 'refs/tags/v')
127+
needs: [publish]
128+
98129
steps:
99130
- uses: actions/checkout@v3
100131

.openapi-generator-ignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
git_push.sh
2+
test/*
3+
!test/__init__.py
4+
!test/test_open_fga_api.py
5+
!test/test_credentials.py
6+
.gitlab-ci.yml
7+
.travis.yml
8+
tox.ini

.openapi-generator/FILES

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
.fossa.yml
2+
.github/CODEOWNERS
3+
.github/ISSUE_TEMPLATES/bug_report.md
4+
.github/ISSUE_TEMPLATES/feature_request.md
5+
.github/PULL_REQUEST_TEMPLATE.md
6+
.github/SECURITY.md
7+
.github/workflows/main.yaml
8+
.github/workflows/semgrep.yaml
9+
.gitignore
10+
.snyk
11+
CHANGELOG.md
12+
CONTRIBUTING.md
13+
LICENSE
14+
NOTICE.txt
15+
README.md
16+
VERSION.txt
17+
docs/Any.md
18+
docs/Assertion.md
19+
docs/AuthorizationModel.md
20+
docs/CheckRequest.md
21+
docs/CheckResponse.md
22+
docs/Computed.md
23+
docs/ContextualTupleKeys.md
24+
docs/CreateStoreRequest.md
25+
docs/CreateStoreResponse.md
26+
docs/Difference.md
27+
docs/ErrorCode.md
28+
docs/ExpandRequest.md
29+
docs/ExpandResponse.md
30+
docs/GetStoreResponse.md
31+
docs/InternalErrorCode.md
32+
docs/InternalErrorMessageResponse.md
33+
docs/Leaf.md
34+
docs/ListObjectsRequest.md
35+
docs/ListObjectsResponse.md
36+
docs/ListStoresResponse.md
37+
docs/Metadata.md
38+
docs/Node.md
39+
docs/Nodes.md
40+
docs/NotFoundErrorCode.md
41+
docs/ObjectRelation.md
42+
docs/OpenFgaApi.md
43+
docs/PathUnknownErrorMessageResponse.md
44+
docs/ReadAssertionsResponse.md
45+
docs/ReadAuthorizationModelResponse.md
46+
docs/ReadAuthorizationModelsResponse.md
47+
docs/ReadChangesResponse.md
48+
docs/ReadRequest.md
49+
docs/ReadResponse.md
50+
docs/RelationMetadata.md
51+
docs/RelationReference.md
52+
docs/Status.md
53+
docs/Store.md
54+
docs/Tuple.md
55+
docs/TupleChange.md
56+
docs/TupleKey.md
57+
docs/TupleKeys.md
58+
docs/TupleOperation.md
59+
docs/TupleToUserset.md
60+
docs/TypeDefinition.md
61+
docs/Users.md
62+
docs/Userset.md
63+
docs/UsersetTree.md
64+
docs/UsersetTreeDifference.md
65+
docs/UsersetTreeTupleToUserset.md
66+
docs/Usersets.md
67+
docs/ValidationErrorMessageResponse.md
68+
docs/WriteAssertionsRequest.md
69+
docs/WriteAuthorizationModelRequest.md
70+
docs/WriteAuthorizationModelResponse.md
71+
docs/WriteRequest.md
72+
openfga_sdk/__init__.py
73+
openfga_sdk/api/__init__.py
74+
openfga_sdk/api/open_fga_api.py
75+
openfga_sdk/api_client.py
76+
openfga_sdk/configuration.py
77+
openfga_sdk/credentials.py
78+
openfga_sdk/exceptions.py
79+
openfga_sdk/models/__init__.py
80+
openfga_sdk/models/any.py
81+
openfga_sdk/models/assertion.py
82+
openfga_sdk/models/authorization_model.py
83+
openfga_sdk/models/check_request.py
84+
openfga_sdk/models/check_response.py
85+
openfga_sdk/models/computed.py
86+
openfga_sdk/models/contextual_tuple_keys.py
87+
openfga_sdk/models/create_store_request.py
88+
openfga_sdk/models/create_store_response.py
89+
openfga_sdk/models/difference.py
90+
openfga_sdk/models/error_code.py
91+
openfga_sdk/models/expand_request.py
92+
openfga_sdk/models/expand_response.py
93+
openfga_sdk/models/get_store_response.py
94+
openfga_sdk/models/internal_error_code.py
95+
openfga_sdk/models/internal_error_message_response.py
96+
openfga_sdk/models/leaf.py
97+
openfga_sdk/models/list_objects_request.py
98+
openfga_sdk/models/list_objects_response.py
99+
openfga_sdk/models/list_stores_response.py
100+
openfga_sdk/models/metadata.py
101+
openfga_sdk/models/node.py
102+
openfga_sdk/models/nodes.py
103+
openfga_sdk/models/not_found_error_code.py
104+
openfga_sdk/models/object_relation.py
105+
openfga_sdk/models/path_unknown_error_message_response.py
106+
openfga_sdk/models/read_assertions_response.py
107+
openfga_sdk/models/read_authorization_model_response.py
108+
openfga_sdk/models/read_authorization_models_response.py
109+
openfga_sdk/models/read_changes_response.py
110+
openfga_sdk/models/read_request.py
111+
openfga_sdk/models/read_response.py
112+
openfga_sdk/models/relation_metadata.py
113+
openfga_sdk/models/relation_reference.py
114+
openfga_sdk/models/status.py
115+
openfga_sdk/models/store.py
116+
openfga_sdk/models/tuple.py
117+
openfga_sdk/models/tuple_change.py
118+
openfga_sdk/models/tuple_key.py
119+
openfga_sdk/models/tuple_keys.py
120+
openfga_sdk/models/tuple_operation.py
121+
openfga_sdk/models/tuple_to_userset.py
122+
openfga_sdk/models/type_definition.py
123+
openfga_sdk/models/users.py
124+
openfga_sdk/models/userset.py
125+
openfga_sdk/models/userset_tree.py
126+
openfga_sdk/models/userset_tree_difference.py
127+
openfga_sdk/models/userset_tree_tuple_to_userset.py
128+
openfga_sdk/models/usersets.py
129+
openfga_sdk/models/validation_error_message_response.py
130+
openfga_sdk/models/write_assertions_request.py
131+
openfga_sdk/models/write_authorization_model_request.py
132+
openfga_sdk/models/write_authorization_model_response.py
133+
openfga_sdk/models/write_request.py
134+
openfga_sdk/rest.py
135+
requirements.txt
136+
setup.cfg
137+
setup.py
138+
test-requirements.txt
139+
test/__init__.py
140+
test/test_credentials.py
141+
test/test_open_fga_api.py

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.1.0-SNAPSHOT

.snyk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
language-settings:
2+
python: '3.10.6'

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Reading and following these guidelines will help us make the contribution proces
1717

1818
## Code of Conduct
1919

20-
By participating and contributing to this project, you are expected to uphold our [Code of Conduct](https://github.com/openfga/rfcs/blob/main/CODE-OF-CONDUCT.md).
20+
By participating and contributing to this project, you are expected to uphold our [Code of Conduct](https://github.com/openfga/.github/blob/main/CODE_OF_CONDUCT.md).
2121

2222
## Getting Started
2323

2424
### Making Changes
2525

26-
When contributing to a repository, the first step is to open an issue on [sdk-generator](https://github.com/openfga/sd-generator) to discuss the change you wish to make before making them.
26+
When contributing to a repository, the first step is to open an issue on [sdk-generator](https://github.com/openfga/sdk-generator) to discuss the change you wish to make before making them.
2727

2828
### Opening Issues
2929

0 commit comments

Comments
 (0)