Skip to content

Commit 9817145

Browse files
authored
Merge branch 'master' into feature/gnome-49-runtime
2 parents f77db4b + 73475e2 commit 9817145

File tree

327 files changed

+269496
-40820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

327 files changed

+269496
-40820
lines changed

.github/workflows/caldav-test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: CalDAV Integration Test
22

3-
on: [pull_request, push]
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
49

510
jobs:
611
caldav-integration:
@@ -51,7 +56,7 @@ jobs:
5156
meson test -C build --suite=caldav-integration --print-errorlogs
5257
5358
- name: Upload Meson test log
54-
uses: actions/upload-artifact@v4
59+
uses: actions/upload-artifact@v5
5560
with:
5661
name: meson-test-log
5762
path: build/meson-logs/testlog.txt

.github/workflows/merge.yml

Lines changed: 74 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,88 @@
11
name: Merge
2-
3-
on:
2+
'on':
43
push:
54
branches:
65
- master
7-
86
jobs:
97
flatpak:
10-
name: "Flatpak"
8+
name: flatpak
119
runs-on: ubuntu-latest
1210
container:
13-
image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48
14-
options: --privileged
11+
image: 'ghcr.io/flathub-infra/flatpak-github-actions:gnome-48'
12+
options: '--privileged'
1513
steps:
1614
- uses: actions/checkout@v5
1715
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
1816
with:
1917
bundle: planify.Devel.flatpak
2018
manifest-path: build-aux/io.github.alainm23.planify.Devel.json
21-
cache-key: flatpak-builder-${{ github.sha }}
22-
23-
# gettext:
24-
# name: Gettext
25-
# runs-on: ubuntu-latest
26-
# container:
27-
# image: ghcr.io/elementary/flatpak-platform/runtime:8.2-x86_64
28-
# options: --privileged
29-
30-
# steps:
31-
# - name: Install git, python3-git and jq
32-
# run: |
33-
# apt-get update
34-
# apt-get install git jq python3-git -y libportal-dev libportal-gtk4-dev
35-
36-
# - name: Clone repository
37-
# uses: actions/checkout@v5
38-
# with:
39-
# token: ${{ secrets.GIT_USER_TOKEN }}
40-
41-
# - name: Install Rust SDK extension
42-
# run: |
43-
# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
44-
# flatpak install -y org.freedesktop.Sdk.Extension.rust-stable//24.08
45-
# flatpak install -y org.gnome.Sdk/x86_64/48
46-
# flatpak install -y org.gnome.Platform/x86_64/48
47-
48-
# - name: Configure Git
49-
# run: |
50-
# git config --global --add safe.directory "$GITHUB_WORKSPACE"
51-
# - name: Update Translation Files
52-
# uses: elementary/actions/gettext-flatpak@main
53-
# with:
54-
# manifest-path: "io.github.alainm23.planify.json"
55-
# env:
56-
# GIT_USER_NAME: "planifyBot"
57-
# GIT_USER_EMAIL: "[email protected]"
19+
cache-key: 'flatpak-builder-${{ github.sha }}'
20+
21+
gettext:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v5
25+
26+
- name: Install gettext
27+
run: sudo apt-get update && sudo apt-get install -y gettext
28+
29+
- name: Pull latest changes
30+
run: |
31+
git config --local user.name "Planify Bot"
32+
git config --local user.email "[email protected]"
33+
git fetch origin master
34+
git rebase origin/master || true
35+
36+
- name: Update POTFILES and translations
37+
run: |
38+
# Regenerate POTFILES
39+
cat > po/POTFILES << 'EOF'
40+
# List of source files containing translatable strings.
41+
# Please keep this file sorted alphabetically.
42+
EOF
43+
44+
find core -name "*.vala" | sort >> po/POTFILES
45+
echo >> po/POTFILES
46+
find src -name "*.vala" | sort >> po/POTFILES
47+
echo >> po/POTFILES
48+
find quick-add -name "*.vala" | sort >> po/POTFILES
49+
echo >> po/POTFILES
50+
echo "data/resources/ui/shortcuts.ui" >> po/POTFILES
51+
52+
# Update translations preserving metadata
53+
python3 scripts/update_translations.py
54+
55+
- name: Check for real changes
56+
id: check_changes
57+
run: |
58+
# Exclude metadata-only changes
59+
if git diff --ignore-matching-lines='^"POT-Creation-Date:' \
60+
--ignore-matching-lines='^"PO-Revision-Date:' \
61+
--ignore-matching-lines='^"Report-Msgid-Bugs-To:' \
62+
--quiet po/; then
63+
echo "has_changes=false" >> $GITHUB_OUTPUT
64+
else
65+
echo "has_changes=true" >> $GITHUB_OUTPUT
66+
fi
67+
68+
- name: Resolve conflicts if any
69+
run: |
70+
if [ -f po/io.github.alainm23.planify.pot ]; then
71+
git add po/io.github.alainm23.planify.pot
72+
fi
73+
git rebase --continue || true
74+
75+
- name: Commit and push changes
76+
if: steps.check_changes.outputs.has_changes == 'true'
77+
run: |
78+
git add po/
79+
git diff --staged --quiet || git commit -m "Update translations"
80+
git push origin master
81+
82+
- name: Notify Weblate of changes
83+
if: steps.check_changes.outputs.has_changes == 'true'
84+
run: |
85+
curl -X POST "https://hosted.weblate.org/api/components/planner/io-github-alainm23-planify/repository/" \
86+
-H "Authorization: Token ${{ secrets.WEBLATE_TOKEN }}" \
87+
-H "Content-Type: application/json" \
88+
-d '{"operation": "pull"}'

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
7+
jobs:
8+
create-release:
9+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'Release')
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v5
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Get version from meson.build
19+
id: version
20+
run: |
21+
VERSION=$(grep -Po "version:\s*'\K[0-9.]+(?=')" meson.build)
22+
echo "version=$VERSION" >> $GITHUB_OUTPUT
23+
24+
- name: Extract changelog from appdata
25+
id: changelog
26+
run: |
27+
python3 << 'PYTHON_SCRIPT' >> $GITHUB_OUTPUT
28+
import xml.etree.ElementTree as ET
29+
tree = ET.parse('data/io.github.alainm23.planify.appdata.xml.in.in')
30+
root = tree.getroot()
31+
version = '${{ steps.version.outputs.version }}'
32+
print('changelog<<EOF')
33+
desc = root.find('.//release[@version="' + version + '"]/description')
34+
if desc is not None:
35+
for elem in desc:
36+
if elem.tag == 'p' and elem.text:
37+
print(elem.text.strip())
38+
print()
39+
elif elem.tag == 'ul':
40+
for li in elem.findall('li'):
41+
print(f"- {li.text.strip()}")
42+
print()
43+
print('EOF')
44+
PYTHON_SCRIPT
45+
46+
- name: Create GitHub Release
47+
uses: softprops/action-gh-release@v2
48+
with:
49+
tag_name: v${{ steps.version.outputs.version }}
50+
name: Planify ${{ steps.version.outputs.version }}
51+
body: |
52+
${{ steps.changelog.outputs.changelog }}
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update Translation Metrics
2+
3+
on:
4+
schedule:
5+
- cron: '0 3 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
generate-metrics:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v5
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v6
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install requests
25+
26+
- name: Generate translation metrics
27+
run: python scripts/generate_translation_metrics.py
28+
29+
- name: Commit and push metrics
30+
run: |
31+
git config user.name "Planify Bot"
32+
git config user.email "[email protected]"
33+
git add data/translations_metrics.json
34+
git diff --staged --quiet || git commit -m "Update translation metrics"
35+
git pull --rebase origin master || true
36+
git push origin master

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"_build/**": true
99
},
1010
"mesonbuild.buildFolder": "_build",
11-
"mesonbuild.mesonPath": "${workspaceFolder}/.flatpak/meson.sh"
11+
"mesonbuild.mesonPath": "${workspaceFolder}/.flatpak/meson.sh",
12+
"kiroAgent.configureMCP": "Disabled"
1213
}

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
Alain Yoyce Meza Huaman <[email protected]>

0 commit comments

Comments
 (0)