mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 07:53:54 +01:00
Simplify CI: metainfo releases only accumulate in Flathub repo
- Remove metainfo update from update-manifest.sh - Remove CI step that committed metainfo back to app repo - Revert permissions back to read-only - CI now inserts release entry directly into Flathub repo's metainfo
This commit is contained in:
17
.github/workflows/flathub.yml
vendored
17
.github/workflows/flathub.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update-flathub:
|
||||
@@ -34,15 +34,6 @@ jobs:
|
||||
- name: Run update-manifest.sh
|
||||
run: bash flatpak/update-manifest.sh "${{ github.event.release.tag_name }}"
|
||||
|
||||
- name: Commit metainfo update to app repo
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add flatpak/app.yaak.Yaak.metainfo.xml
|
||||
git diff --cached --quiet && echo "No metainfo changes" && exit 0
|
||||
git commit -m "Add ${{ github.event.release.tag_name }} to metainfo releases"
|
||||
git push origin HEAD:main
|
||||
|
||||
- name: Checkout Flathub repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -51,15 +42,19 @@ jobs:
|
||||
path: flathub-repo
|
||||
|
||||
- name: Copy updated files to Flathub repo
|
||||
env:
|
||||
VERSION: ${{ github.event.release.tag_name }}
|
||||
run: |
|
||||
cp flatpak/app.yaak.Yaak.yml flathub-repo/
|
||||
cp flatpak/app.yaak.Yaak.metainfo.xml flathub-repo/
|
||||
cp flatpak/cargo-sources.json flathub-repo/
|
||||
cp flatpak/node-sources.json flathub-repo/
|
||||
cp LICENSE flathub-repo/
|
||||
# Rewrite paths for Flathub repo flat structure
|
||||
sed -i 's|path: \.\./LICENSE|path: LICENSE|' flathub-repo/app.yaak.Yaak.yml
|
||||
sed -i 's|install -Dm644 flatpak/app.yaak.Yaak.metainfo.xml|install -Dm644 app.yaak.Yaak.metainfo.xml|' flathub-repo/app.yaak.Yaak.yml
|
||||
sed -i '/path: LICENSE/a\ # Metainfo file (with release history)\n - type: file\n path: app.yaak.Yaak.metainfo.xml' flathub-repo/app.yaak.Yaak.yml
|
||||
# Add new release to Flathub metainfo (accumulates over time)
|
||||
sed -i "s| <releases>| <releases>\n <release version=\"${VERSION#v}\" date=\"$(date +%Y-%m-%d)\" />|" flathub-repo/app.yaak.Yaak.metainfo.xml
|
||||
|
||||
- name: Commit and push to Flathub
|
||||
working-directory: flathub-repo
|
||||
|
||||
Reference in New Issue
Block a user