use fpm to build deb; installs to /opt/gotify-tray/
This commit is contained in:
17
.github/workflows/develop.yml
vendored
17
.github/workflows/develop.yml
vendored
@@ -36,7 +36,6 @@ jobs:
|
||||
path: gotify-tray-installer-win.exe
|
||||
|
||||
build-ubuntu:
|
||||
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||
strategy:
|
||||
matrix:
|
||||
tag: [jammy]
|
||||
@@ -49,18 +48,24 @@ jobs:
|
||||
python-version: '3.10.8'
|
||||
- name: Upgrade pip and enable wheel support
|
||||
run: python -m pip install --upgrade pip setuptools wheel
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
cp dist/gotify-tray_amd64.deb gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
gem install fpm
|
||||
chmod +x build-linux.sh
|
||||
./build-linux.sh deb
|
||||
mv "dist/gotify-tray_${{github.ref_name}}_amd64.deb" "gotify-tray_${{github.ref_name}}_amd64_${{ matrix.tag }}.deb"
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
path: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
path: "gotify-tray_*_amd64_${{ matrix.tag }}.deb"
|
||||
|
||||
|
||||
build-macos:
|
||||
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
53
.github/workflows/release.yml
vendored
53
.github/workflows/release.yml
vendored
@@ -33,29 +33,6 @@ jobs:
|
||||
name: gotify-tray-installer-win.exe
|
||||
path: gotify-tray-installer-win.exe
|
||||
|
||||
build-ubuntu:
|
||||
strategy:
|
||||
matrix:
|
||||
tag: [focal, jammy]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10.8'
|
||||
- name: Upgrade pip and enable wheel support
|
||||
run: python -m pip install --upgrade pip setuptools wheel
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
cp dist/gotify-tray_amd64.deb gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
path: gotify-tray_amd64_ubuntu_${{ matrix.tag }}.deb
|
||||
|
||||
build-debian:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -69,15 +46,22 @@ jobs:
|
||||
python-version: '3.10.8'
|
||||
- name: Upgrade pip and enable wheel support
|
||||
run: python -m pip install --upgrade pip setuptools wheel
|
||||
- uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
- name: Build
|
||||
run: |
|
||||
make build
|
||||
cp dist/gotify-tray_amd64.deb gotify-tray_amd64_debian_${{ matrix.tag }}.deb
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
gem install fpm
|
||||
chmod +x build-linux.sh
|
||||
./build-linux.sh deb
|
||||
mv "dist/gotify-tray_$(cat version.txt)_amd64.deb" "gotify-tray_$(cat version.txt)_amd64_${{ matrix.tag }}.deb"
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gotify-tray_amd64_debian_${{ matrix.tag }}.deb
|
||||
path: gotify-tray_amd64_debian_${{ matrix.tag }}.deb
|
||||
name: gotify-tray_${{github.ref_name}}_amd64_${{ matrix.tag }}.deb
|
||||
path: gotify-tray_${{github.ref_name}}_amd64_${{ matrix.tag }}.deb
|
||||
|
||||
build-macos:
|
||||
runs-on: macos-12
|
||||
@@ -102,6 +86,11 @@ jobs:
|
||||
|
||||
pypi:
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/gotify-tray
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
@@ -118,8 +107,6 @@ jobs:
|
||||
run: python -m build
|
||||
- name: upload to pypi
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
@@ -128,7 +115,7 @@ jobs:
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-win64, build-ubuntu, build-debian, build-macos, pypi]
|
||||
needs: [build-win64, build-debian, build-macos, pypi]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/download-artifact@v3
|
||||
@@ -139,9 +126,7 @@ jobs:
|
||||
prerelease: false
|
||||
files: |
|
||||
gotify-tray-installer-win.exe
|
||||
gotify-tray_amd64_ubuntu_focal.deb
|
||||
gotify-tray_amd64_ubuntu_jammy.deb
|
||||
gotify-tray_amd64_debian_bullseye.deb
|
||||
gotify-tray_amd64_debian_bookworm.deb
|
||||
gotify-tray.dmg
|
||||
gotify-tray_${{github.ref_name}}_amd64_bullseye.deb
|
||||
gotify-tray_${{github.ref_name}}_amd64_bookworm.deb
|
||||
gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
||||
|
||||
15
Makefile
15
Makefile
@@ -1,23 +1,8 @@
|
||||
build: clean
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
pyinstaller gotify-tray.spec
|
||||
cp -r debian build/debian
|
||||
mkdir build/debian/usr/lib
|
||||
cp -r dist/gotify-tray build/debian/usr/lib/gotify-tray
|
||||
dpkg -b build/debian dist/gotify-tray_amd64.deb
|
||||
|
||||
build-macos: clean
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
pip install Pillow
|
||||
pyinstaller gotify-tray.spec
|
||||
|
||||
install: build
|
||||
sudo dpkg -i dist/gotify-tray_amd64.deb
|
||||
|
||||
uninstall:
|
||||
sudo dpkg -r gotify-tray
|
||||
|
||||
clean:
|
||||
rm -rf dist build
|
||||
|
||||
37
build-linux.sh
Normal file
37
build-linux.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
echo "Call the script with the desired fpm output type [deb, pacman, ...]"
|
||||
exit
|
||||
fi
|
||||
|
||||
rm -rf build/linux
|
||||
|
||||
pyinstaller gotify-tray.spec
|
||||
|
||||
mkdir -p build/linux/opt
|
||||
mkdir -p build/linux/usr/share/applications
|
||||
mkdir -p build/linux/usr/share/icons
|
||||
|
||||
cp -r dist/gotify-tray build/linux/opt/gotify-tray
|
||||
cp gotify_tray/gui/images/logo.ico build/linux/usr/share/icons/gotify-tray.ico
|
||||
cp gotifytray.desktop build/linux/usr/share/applications
|
||||
|
||||
find build/linux/opt/gotify-tray -type f -exec chmod 644 -- {} +
|
||||
find build/linux/opt/gotify-tray -type d -exec chmod 755 -- {} +
|
||||
find build/linux/usr/share -type f -exec chmod 644 -- {} +
|
||||
chmod +x build/linux/opt/gotify-tray/gotify-tray
|
||||
|
||||
fpm --verbose \
|
||||
-C build/linux \
|
||||
-s dir \
|
||||
-t $1 \
|
||||
-p dist/ \
|
||||
-n gotify-tray \
|
||||
--url https://github.com/seird/gotify-tray \
|
||||
-m k.dries@protonmail.com \
|
||||
--description "Gotify Tray. A tray notification application for receiving messages from a Gotify server." \
|
||||
--category internet \
|
||||
--version "$(cat version.txt)" \
|
||||
--license GPLv3
|
||||
6
debian/DEBIAN/control
vendored
6
debian/DEBIAN/control
vendored
@@ -1,6 +0,0 @@
|
||||
Package: gotify-tray
|
||||
Version: 0.5.1
|
||||
Architecture: amd64
|
||||
Maintainer: k.dries@protonmail.com
|
||||
Description: Gotify Tray
|
||||
A tray notification application for receiving messages from a Gotify server.
|
||||
BIN
debian/usr/share/icons/gotify-tray.ico
vendored
BIN
debian/usr/share/icons/gotify-tray.ico
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 132 KiB |
@@ -1,8 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=Gotify Tray
|
||||
Comment=A tray notification application for receiving messages from a Gotify server.
|
||||
Path=/usr/lib/gotify-tray
|
||||
Exec=/usr/lib/gotify-tray/gotify-tray
|
||||
Path=/opt/gotify-tray
|
||||
Exec=/opt/gotify-tray/gotify-tray
|
||||
Icon=/usr/share/icons/gotify-tray.ico
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Reference in New Issue
Block a user