Skip to content

Commit cbfcffd

Browse files
authored
build(pip): publish java-api and java-api-stubs to PyPI (#5)
1 parent a996a49 commit cbfcffd

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
ci:
10+
uses: ./.github/workflows/ci.yml
11+
12+
pr-build:
13+
needs: ci
14+
uses: ./.github/workflows/pr-build.yml
15+
16+
pypi-upload:
17+
needs: pr-build
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v6
22+
23+
- name: Upload ignition-api to PyPI
24+
uses: coatl-dev/actions/pypi-upload@v5
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN_JAVA_API_PKG }}
27+
working-directory: java-api
28+
29+
- name: Upload ignition-api-stubs to PyPI
30+
uses: coatl-dev/actions/pypi-upload@v5
31+
with:
32+
python-version: '3.12'
33+
password: ${{ secrets.PYPI_API_TOKEN_JAVA_API_STUBS }}
34+
working-directory: java-api-stubs

java-api-stubs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ files were generated using `mypy`'s [`stubgen`].
66
## Installation and usage
77

88
To use java-api-stubs, you may install it with `pip`. It requires Python
9-
3.7+ through 3.12.
9+
3.7 through 3.12.
1010

1111
> [!WARNING]
1212
> Python 3.13 will not be supported.
1313
1414
```sh
1515
python3 -m pip install \
16-
git+https://github.com/ignition-devs/java-api-17.git#subdirectory=java-api-stubs \
16+
java-api-stubs \
1717
"mypy[python2]==0.971"
1818
```
1919

java-api/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The preferred method is to install it by running `pip`. It requires Python
3232
2.7.18.
3333

3434
```bash
35-
python2 -m pip install git+https://github.com/ignition-devs/java-api-17.git#subdirectory=java-api
35+
python2 -m pip install java-api
3636
```
3737

3838
This will install it as package to your Python installation, which will allow
@@ -41,8 +41,8 @@ completion using an IDE such as PyCharm and Visual Studio Code.
4141

4242
```bash
4343
$ python2
44-
Python 2.7.18 (default, Nov 9 2020, 16:23:15)
45-
[GCC Apple LLVM 12.0.0 (clang-1200.0.32.21)] on darwin
44+
Python 2.7.18 (default, Sep 23 2024, 13:23:35)
45+
[GCC Apple LLVM 16.0.0 (clang-1600.0.26.3)] on darwin
4646
Type "help", "copyright", "credits" or "license" for more information.
4747
>>> from __future__ import print_function
4848
>>> import java.lang

0 commit comments

Comments
 (0)