Replace PyPI publishing with Debian package build in release workflow
This commit is contained in:
51
.github/workflows/release.yml
vendored
51
.github/workflows/release.yml
vendored
@@ -7,13 +7,8 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
pypi:
|
build-deb:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment:
|
|
||||||
name: pypi
|
|
||||||
url: https://pypi.org/p/gotify-tray
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
@@ -22,23 +17,47 @@ jobs:
|
|||||||
python-version: '3.13'
|
python-version: '3.13'
|
||||||
- name: Upgrade pip and enable wheel support
|
- name: Upgrade pip and enable wheel support
|
||||||
run: python -m pip install --upgrade pip setuptools wheel
|
run: python -m pip install --upgrade pip setuptools wheel
|
||||||
- name: install requirements
|
- name: Install Requirements
|
||||||
run: |
|
run: |
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
pip install build
|
pip install pyinstaller
|
||||||
- name: create pip package
|
- name: Build binary
|
||||||
run: python -m build
|
run: pyinstaller gotify-tray.spec
|
||||||
- name: upload to pypi
|
- name: Install fpm
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
run: sudo gem install fpm
|
||||||
|
- name: Build Debian package
|
||||||
|
run: |
|
||||||
|
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 deb \
|
||||||
|
-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
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
name: gotify-tray_${{github.ref_name}}_amd64.deb
|
||||||
path: dist/gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
path: dist/gotify-tray_${{github.ref_name}}_amd64.deb
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [pypi]
|
needs: [build-deb]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
@@ -48,4 +67,4 @@ jobs:
|
|||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
prerelease: false
|
prerelease: false
|
||||||
files: |
|
files: |
|
||||||
gotify_tray-${{github.ref_name}}-py3-none-any.whl
|
gotify-tray_${{github.ref_name}}_amd64.deb
|
||||||
|
|||||||
Reference in New Issue
Block a user