Skip to content

Commit 7df0109

Browse files
authored
Merge pull request #235 from sanders41/deb
Add deb install instruction and build
2 parents 0cbe431 + ae532c2 commit 7df0109

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/publish_binaries.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,28 @@ jobs:
5151
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
5252
- name: Publish
5353
run: cargo publish --token ${{ secrets.CARGO_API_TOKEN }}
54+
build-deb:
55+
name: Build and upload deb package
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Install Rust
60+
run: |
61+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
62+
- name: Install packages
63+
run: apt install build-essential pkg-config libssl-dev
64+
- name: Install cargo-deb
65+
run: cargo install cargo-deb
66+
- name: Create package
67+
id: create-deb
68+
run: |
69+
cargo deb --deb-revision="" # --deb-revision="" removes the -1 post tag
70+
cd target/debian
71+
DEB_FILE=$(find python-project-generator*_*.deb)
72+
- name: Upload deb package to release
73+
uses: svenstaro/upload-release-action@v2
74+
with:
75+
repo_token: ${{ secrets.GITHUB_TOKEN}}
76+
file: target/debian/${{ steps.create-deb.DEB_FILE }}
77+
asset_name: ${{ steps.create-deb.DEB_FILE }}
78+
tag: ${{ github.ref }}

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ Install on Arch with the AUR:
4747
paru -S python-project-generator-bin
4848
```
4949

50+
Install on Debian/Ubuntu:
51+
52+
Note: Change the version to match the version you want to install.
53+
54+
```sh
55+
curl -LO https://github.com/sanders41/python-project-generator/releases/download/v1.0.16/python-project-generator_1.0.16_amd64.deb
56+
sudo dpkg -i python_project_generator_1.0.16_amd64.deb
57+
```
58+
5059
Python Project Generator can also be installed with binaries provided with each release
5160
[here](https://github.com/sanders41/python-project-generator/releases), or with cargo.
5261

0 commit comments

Comments
 (0)