Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eefcbc86e5 | ||
|
|
0d9d3f8d6c | ||
|
|
a3c99b5f48 | ||
|
|
5ce72c71e3 | ||
|
|
2b7079612e | ||
|
|
3d51013e48 | ||
|
|
f19f474df7 | ||
|
|
c49f761f93 | ||
|
|
ca05007197 | ||
|
|
c2473ad714 | ||
|
|
56bebb4be7 |
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
@@ -28,11 +28,16 @@ jobs:
|
||||
ls -la /lib/x86_64-linux-gnu/libpython* 2>/dev/null || echo "Not found in /lib"
|
||||
- name: Build binary
|
||||
run: pyinstaller gotify-tray.spec
|
||||
- name: Set version
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
|
||||
- name: Install Ruby and fpm
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ruby-full
|
||||
gem install fpm
|
||||
export PATH="$(ruby -e 'puts Gem.user_dir')/bin:$PATH"
|
||||
- name: Check fpm
|
||||
run: which fpm
|
||||
- name: Build Debian package
|
||||
run: |
|
||||
mkdir -p build/linux/opt
|
||||
@@ -55,24 +60,24 @@ jobs:
|
||||
-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)" \
|
||||
--version "$VERSION" \
|
||||
--license GPLv3
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: gotify-tray_${{github.ref_name}}_amd64.deb
|
||||
path: dist/gotify-tray_${{github.ref_name}}_amd64.deb
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-deb]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/download-artifact@v3
|
||||
- name: Release
|
||||
uses: marvinpinto/action-automatic-releases@latest
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
prerelease: false
|
||||
files: |
|
||||
gotify-tray_${{github.ref_name}}_amd64.deb
|
||||
- name: Check deb file
|
||||
run: ls -la dist/
|
||||
- name: Create release
|
||||
run: |
|
||||
RESPONSE=$(curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\": \"${GITHUB_REF_NAME}\", \"name\": \"Release ${GITHUB_REF_NAME}\", \"body\": \"Automated release\"}" \
|
||||
http://192.168.88.97:3000/api/v1/repos/kadu/gotify-tray-customized/releases)
|
||||
echo "Release response: $RESPONSE"
|
||||
RELEASE_ID=$(echo $RESPONSE | jq -r '.id')
|
||||
echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
|
||||
- name: Upload asset
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary @dist/gotify-tray_${VERSION}_amd64.deb \
|
||||
http://192.168.88.97:3000/api/v1/repos/kadu/gotify-tray-customized/releases/${RELEASE_ID}/assets?name=gotify-tray_${VERSION}_amd64.deb
|
||||
|
||||
Reference in New Issue
Block a user