Skip to content

Commit ec6d0ae

Browse files
committed
formatting
1 parent 07b1aa6 commit ec6d0ae

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

py-setup-project.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,29 @@ push:
1818
python_ver: 3.8
1919
```
2020
21+
4. The project's release version is obtained from your plugin.json automatically by the ci, so when built it will be appended to the zip file later:
22+
23+
```yml
24+
- name: get version
25+
id: version
26+
uses: notiz-dev/github-action-json-property@release
27+
with:
28+
path: 'plugin.json'
29+
prop_path: 'Version'
30+
```
31+
32+
5. The 'Install dependencies' section is where you will do most of your CI work. Notice it installs the requirements.txt and outputs it with the `-t` parameter to the `./lib` folder. This tells pip to dump all the installed modules to the local lib folder which you will zip up along with your project using the `zip -r Flow.Launcher.Plugin.HelloWorldPython.zip . -x '*.git*'`, where you replace this `Flow.Launcher.Plugin.HelloWorldPython` with the name of your plugin.
33+
34+
You can also add additional steps here to unpack/install any additional depedencies your plugin requires, for example compiling additional translation files like [this](https://github.com/deefrawley/Flow.Launcher.Plugin.Currency/blob/23770ee929af059b1b1b7f9b5f3327b692ac9587/.github/workflows/Publish%20Release.yml#L34)
35+
36+
```yml
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -r ./requirements.txt -t ./lib
41+
zip -r Flow.Launcher.Plugin.HelloWorldPython.zip . -x '*.git*'
42+
```
43+
2144
### 2. Publish as zip
2245
The final step to the workflow file is this publish section, which will publish the zip file you generated, upload to GitHub Releases page and tag with the version generated from the previous step from your plugin.json file. Remember again to replace `Flow.Launcher.Plugin.HelloWorldPython` with the name of your plugin.
2346
```yml

0 commit comments

Comments
 (0)