Skip to content

Commit 50d70f4

Browse files
committed
Init package
1 parent 7cec655 commit 50d70f4

3 files changed

Lines changed: 54 additions & 25 deletions

File tree

.github/workflows/appimage.yml

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,40 @@ concurrency:
44
cancel-in-progress: true
55
on:
66
schedule:
7-
- cron: "0 7 1/21 * *" # We default to rebuilding every 21 days, change this to your liking
7+
- cron: "0 7 * * 1" # Check for new version every Monday
88
workflow_dispatch: {}
99

1010
jobs:
11+
check-version:
12+
name: Check AUR version
13+
runs-on: ubuntu-latest
14+
outputs:
15+
version_changed: ${{ steps.check.outputs.changed }}
16+
aur_version: ${{ steps.check.outputs.version }}
17+
steps:
18+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
- name: Compare AUR version with latest release
20+
id: check
21+
run: |
22+
AUR_VERSION=$(curl -sL "https://aur.archlinux.org/rpc/v5/info?arg[]=qownnotes" \
23+
| jq -r '.results[0].Version')
24+
echo "AUR version: ${AUR_VERSION}"
25+
echo "version=${AUR_VERSION}" >> "${GITHUB_OUTPUT}"
26+
if [ -f ./LATEST_VERSION ]; then
27+
LATEST=$(cat ./LATEST_VERSION | tr -d '[:space:]')
28+
echo "Latest released: ${LATEST}"
29+
if [ "${AUR_VERSION}" = "${LATEST}" ]; then
30+
echo "Version unchanged, skipping build."
31+
echo "changed=false" >> "${GITHUB_OUTPUT}"
32+
exit 0
33+
fi
34+
fi
35+
echo "New version detected (or no previous release). Will build."
36+
echo "changed=true" >> "${GITHUB_OUTPUT}"
37+
1138
build:
39+
needs: check-version
40+
if: needs.check-version.outputs.version_changed == 'true'
1241
name: "${{ matrix.name }} (${{ matrix.arch }})"
1342
runs-on: ${{ matrix.runs-on }}
1443
strategy:
@@ -17,7 +46,6 @@ jobs:
1746
- runs-on: ubuntu-latest
1847
name: Build AppImage
1948
arch: x86_64
20-
# comment out these 3 lines if aarch64 is not wanted
2149
- runs-on: ubuntu-24.04-arm
2250
name: Build AppImage
2351
arch: aarch64
@@ -42,9 +70,27 @@ jobs:
4270
permissions: write-all
4371
runs-on: ubuntu-latest
4472
steps:
73+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4574
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
4675
with:
4776
pattern: AppImage-*
4877
merge-multiple: true
4978
- name: Release AppImage
50-
uses: pkgforge-dev/make-stable-appimage-release@4ed3d48ccb065352b6e6c0db6d39885b201c54a0 #v1.1
79+
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
80+
with:
81+
name: "QOwnNotes: ${{ needs.check-version.outputs.aur_version }}"
82+
tag_name: "${{ needs.check-version.outputs.aur_version }}"
83+
prerelease: false
84+
draft: false
85+
generate_release_notes: false
86+
make_latest: true
87+
files: |
88+
*.AppImage*
89+
- name: Update LATEST_VERSION
90+
run: |
91+
echo "${{ needs.check-version.outputs.aur_version }}" > ./LATEST_VERSION
92+
git config user.name "github-actions[bot]"
93+
git config user.email "github-actions[bot]@users.noreply.github.com"
94+
git add ./LATEST_VERSION
95+
git commit --allow-empty -m 'bump `LATEST_VERSION` [skip ci]'
96+
git push

get-dependencies.sh

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,4 @@ echo "Installing debloated packages..."
1212
echo "---------------------------------------------------------------"
1313
get-debloated-pkgs --add-common --prefer-nano
1414

15-
# Comment this out if you need an AUR package
16-
#make-aur-package PACKAGENAME
17-
18-
# If the application needs to be manually built that has to be done down here
19-
20-
# if you also have to make nightly releases check for DEVEL_RELEASE = 1
21-
#
22-
# if [ "${DEVEL_RELEASE-}" = 1 ]; then
23-
# nightly build steps
24-
# else
25-
# regular build steps
26-
# fi
15+
make-aur-package qownnotes

make-appimage.sh

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@
33
set -eu
44

55
ARCH=$(uname -m)
6-
VERSION=$(pacman -Q PACKAGENAME | awk '{print $2; exit}') # example command to get version of application here
6+
VERSION=$(pacman -Q qownnotes | awk '{print $2; exit}')
77
export ARCH VERSION
88
export OUTPATH=./dist
99
export ADD_HOOKS="self-updater.bg.hook"
1010
export UPINFO="gh-releases-zsync|${GITHUB_REPOSITORY%/*}|${GITHUB_REPOSITORY#*/}|latest|*$ARCH.AppImage.zsync"
11-
export ICON=PATH_OR_URL_TO_ICON
12-
export DESKTOP=PATH_OR_URL_TO_DESKTOP_ENTRY
11+
export ICON=/usr/share/icons/hicolor/512x512/apps/QOwnNotes.png
12+
export DESKTOP=/usr/share/applications/PBE.QOwnNotes.desktop
1313

14-
# Deploy dependencies
15-
quick-sharun /PATH/TO/BINARY_AND_LIBRARIES_HERE
14+
quick-sharun /usr/bin/QOwnNotes /usr/share/QOwnNotes
1615

17-
# Additional changes can be done in between here
18-
19-
# Turn AppDir into AppImage
2016
quick-sharun --make-appimage
2117

22-
# Test the app for 12 seconds, if the test fails due to the app
23-
# having issues running in the CI use --simple-test instead
2418
quick-sharun --test ./dist/*.AppImage

0 commit comments

Comments
 (0)