File tree Expand file tree Collapse file tree 2 files changed +47
-35
lines changed Expand file tree Collapse file tree 2 files changed +47
-35
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+
3
+ # See https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
4
+ # Also see https://github.com/marketplace/actions/pypi-publish
5
+
6
+ name : Build Debian package 📦
7
+
8
+ on :
9
+ release :
10
+ types : [published]
11
+ workflow_dispatch :
12
+
13
+ jobs :
14
+ build-deb :
15
+ name : Build Debian package 📦
16
+ runs-on : ubuntu-latest
17
+ # Add permissions for releases
18
+ permissions :
19
+ contents : write
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - name : Set up Python
23
+ uses : actions/setup-python@v2
24
+ with :
25
+ python-version : ' 3.x'
26
+ - name : Install apt packages
27
+ run : sudo apt-get update && sudo apt-get install -y dpkg-dev debhelper dh-python build-essential python3-all
28
+ - name : Install dependencies
29
+ run : |
30
+ python -m pip install --upgrade pip
31
+ pip install setuptools
32
+ pip install stdeb3
33
+ pip install python-dateutil
34
+ pip install wheel
35
+ - name : Clean up previous builds
36
+ run : rm -rf deb_dist/ || true
37
+ - name : Build Debian package
38
+ run : |
39
+ make build_deb || exit 1
40
+ - name : List built packages
41
+ run : find deb_dist -name "*.deb"
42
+ - name : Upload Debian package to release
43
+ uses : softprops/action-gh-release@v2
44
+ with :
45
+ token : ${{ secrets.PAT }}
46
+ files : " deb_dist/*.deb"
47
+ tag_name : ${{ github.event.release.tag_name }}
Original file line number Diff line number Diff line change 58
58
path : dist/
59
59
- name : Publish distribution 📦 to PyPI
60
60
uses : pypa/gh-action-pypi-publish@release/v1
61
-
62
- build-deb :
63
- name : Build Debian package 📦
64
- runs-on : ubuntu-latest
65
- # Add permissions for releases
66
- permissions :
67
- contents : write
68
- steps :
69
- - uses : actions/checkout@v4
70
- - name : Set up Python
71
- uses : actions/setup-python@v2
72
- with :
73
- python-version : ' 3.x'
74
- - name : Install apt packages
75
- run : sudo apt-get update && sudo apt-get install -y dpkg-dev debhelper dh-python build-essential python3-all
76
- - name : Install dependencies
77
- run : |
78
- python -m pip install --upgrade pip
79
- pip install setuptools
80
- pip install stdeb3
81
- pip install python-dateutil
82
- pip install wheel
83
- - name : Clean up previous builds
84
- run : rm -rf deb_dist/ || true
85
- - name : Build Debian package
86
- run : |
87
- make build_deb || exit 1
88
- - name : List built packages
89
- run : find deb_dist -name "*.deb"
90
- - name : Upload Debian package to release
91
- uses : softprops/action-gh-release@v2
92
- with :
93
- token : ${{ secrets.PAT }}
94
- files : " deb_dist/*.deb"
95
- tag_name : ${{ github.event.release.tag_name }}
You can’t perform that action at this time.
0 commit comments