Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d7845440c | ||
|
|
31c8b3139a | ||
|
|
ea3d534774 | ||
|
|
eefcbc86e5 | ||
|
|
0d9d3f8d6c | ||
|
|
a3c99b5f48 | ||
|
|
5ce72c71e3 | ||
|
|
2b7079612e | ||
|
|
3d51013e48 | ||
|
|
f19f474df7 |
44
.github/workflows/release.yml
vendored
44
.github/workflows/release.yml
vendored
@@ -28,6 +28,8 @@ jobs:
|
|||||||
ls -la /lib/x86_64-linux-gnu/libpython* 2>/dev/null || echo "Not found in /lib"
|
ls -la /lib/x86_64-linux-gnu/libpython* 2>/dev/null || echo "Not found in /lib"
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
run: pyinstaller gotify-tray.spec
|
run: pyinstaller gotify-tray.spec
|
||||||
|
- name: Set version
|
||||||
|
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
|
||||||
- name: Install Ruby and fpm
|
- name: Install Ruby and fpm
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -42,7 +44,7 @@ jobs:
|
|||||||
mkdir -p build/linux/usr/share/applications
|
mkdir -p build/linux/usr/share/applications
|
||||||
mkdir -p build/linux/usr/share/icons
|
mkdir -p build/linux/usr/share/icons
|
||||||
cp -r dist/gotify-tray build/linux/opt/gotify-tray
|
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 gotify_tray/gui/images/gotify-small.png build/linux/usr/share/pixmaps/gotify-tray.png
|
||||||
cp gotifytray.desktop build/linux/usr/share/applications
|
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 f -exec chmod 644 -- {} +
|
||||||
find build/linux/opt/gotify-tray -type d -exec chmod 755 -- {} +
|
find build/linux/opt/gotify-tray -type d -exec chmod 755 -- {} +
|
||||||
@@ -58,28 +60,24 @@ jobs:
|
|||||||
-m k.dries@protonmail.com \
|
-m k.dries@protonmail.com \
|
||||||
--description "Gotify Tray. A tray notification application for receiving messages from a Gotify server." \
|
--description "Gotify Tray. A tray notification application for receiving messages from a Gotify server." \
|
||||||
--category internet \
|
--category internet \
|
||||||
--version "${{github.ref_name#v}}" \
|
--version "$VERSION" \
|
||||||
--license GPLv3
|
--license GPLv3
|
||||||
- name: Check deb file
|
- name: Check deb file
|
||||||
run: ls -la dist/
|
run: ls -la dist/
|
||||||
- name: Upload artifact
|
- name: Create release
|
||||||
uses: actions/upload-artifact@v3
|
run: |
|
||||||
with:
|
RESPONSE=$(curl -X POST \
|
||||||
name: gotify-tray_${{github.ref_name}}_amd64.deb
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
path: dist/gotify-tray_${{github.ref_name}}_amd64.deb
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"tag_name\": \"${GITHUB_REF_NAME}\", \"name\": \"Release ${GITHUB_REF_NAME}\", \"body\": \"Automated release\"}" \
|
||||||
release:
|
http://192.168.88.97:3000/api/v1/repos/kadu/gotify-tray-customized/releases)
|
||||||
runs-on: ubuntu-latest
|
echo "Release response: $RESPONSE"
|
||||||
needs: [build-deb]
|
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
||||||
steps:
|
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
|
||||||
- uses: actions/checkout@v4
|
- name: Upload asset
|
||||||
- uses: actions/download-artifact@v3
|
run: |
|
||||||
with:
|
curl -X POST \
|
||||||
name: gotify-tray_${{github.ref_name}}_amd64.deb
|
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
- name: Release
|
-H "Content-Type: application/octet-stream" \
|
||||||
uses: marvinpinto/action-automatic-releases@latest
|
--data-binary @dist/gotify-tray_${VERSION}_amd64.deb \
|
||||||
with:
|
http://192.168.88.97:3000/api/v1/repos/kadu/gotify-tray-customized/releases/${RELEASE_ID}/assets?name=gotify-tray_${VERSION}_amd64.deb
|
||||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
prerelease: false
|
|
||||||
files: |
|
|
||||||
gotify-tray_${{github.ref_name}}_amd64.deb
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Name=Gotify Tray
|
|||||||
Comment=A tray notification application for receiving messages from a Gotify server.
|
Comment=A tray notification application for receiving messages from a Gotify server.
|
||||||
Path=/opt/gotify-tray
|
Path=/opt/gotify-tray
|
||||||
Exec=/opt/gotify-tray/gotify-tray
|
Exec=/opt/gotify-tray/gotify-tray
|
||||||
Icon=/usr/share/icons/gotify-tray.ico
|
Icon=/usr/share/pixmaps/gotify-tray.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Network;
|
Categories=Network;
|
||||||
|
|||||||
21
release.sh
Executable file
21
release.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script to create and push a release tag
|
||||||
|
# Usage: ./release.sh <version> [message]
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo "Usage: $0 <version> [message]"
|
||||||
|
echo "Example: $0 v0.5.22 'Release v0.5.22'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
MESSAGE=${2:-"Release $VERSION"}
|
||||||
|
|
||||||
|
echo "Creating tag $VERSION with message: $MESSAGE"
|
||||||
|
git tag -a "$VERSION" -m "$MESSAGE"
|
||||||
|
|
||||||
|
echo "Pushing tag $VERSION"
|
||||||
|
git push local "$VERSION"
|
||||||
|
|
||||||
|
echo "Tag $VERSION pushed. Workflow will build and release automatically."
|
||||||
Reference in New Issue
Block a user