use fpm to build deb; installs to /opt/gotify-tray/

This commit is contained in:
dries.k
2023-08-22 20:59:30 +02:00
parent 851056852d
commit 0f5caf1b9d
7 changed files with 72 additions and 66 deletions

View File

@@ -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,17 +107,15 @@ 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:
name: gotify_tray-${{ github.ref_name }}-py3-none-any.whl
path: dist/gotify_tray-${{ github.ref_name }}-py3-none-any.whl
name: gotify_tray-${{github.ref_name}}-py3-none-any.whl
path: dist/gotify_tray-${{github.ref_name}}-py3-none-any.whl
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 }}-py3-none-any.whl
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