-
Notifications
You must be signed in to change notification settings - Fork 7k
62 lines (52 loc) · 1.84 KB
/
release-plugin-python.yml
File metadata and controls
62 lines (52 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Release Python Plugin
on:
workflow_dispatch:
inputs:
tag:
description: "Tag for the plugin release (e.g. plugin-python-v1.0.0)"
required: true
permissions:
contents: write
jobs:
release:
name: Build and Release Python Plugin
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Create distribution tarball
working-directory: plugin/python
run: |
mkdir -p release
# Create tarball with source code (venv is created on first run by pluginctl.sh)
# Note: pluginctl.sh is NOT included - it's copied separately by Dockerfile
# and we don't want old releases to overwrite newer pluginctl.sh versions
tar --exclude='*.pyc' \
--exclude='__pycache__' \
-czf release/python-plugin.tar.gz \
main.py \
contract/ \
pyproject.toml \
Makefile
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
name: "Python Plugin ${{ github.event.inputs.tag }}"
body: |
Python Plugin Release ${{ github.event.inputs.tag }}
## Requirements
- Python 3.9 or later
## Installation
1. Extract `python-plugin.tar.gz` to `plugin/python/`
2. The plugin will create a virtual environment on first run
## Assets
- `python-plugin.tar.gz` - Source code with pyproject.toml
files: |
plugin/python/release/python-plugin.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}