Skip to content

Commit 58ab02d

Browse files
authored
Merge pull request #2207 from wvengen/flathub-support
Flathub trigger & version check
2 parents 3d17e6b + 5a65fe2 commit 58ab02d

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/flathub.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Trigger Flathub update
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
dispatch:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger Flathub update workflow
12+
uses: peter-evans/repository-dispatch@v4
13+
with:
14+
repository: flathub/org.artisan_scope.artisan
15+
event-type: trigger-workflow
16+
token: ${{ secrets.TRIGGER_WORKFLOW_TOKEN }}

.github/workflows/metainfo.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Check metainfo version
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v6
13+
- run: |
14+
TAG_VERSION=`echo "${GITHUB_REF_NAME}" | sed 's/^v//'`
15+
METAINFO_VERSION=`cat src/debian/usr/share/metainfo/org.artisan_scope.artisan.metainfo.xml | sed 's/^\s*<release.*version="\([^"]\+\)".*$/\1/p;d' | head -n1`
16+
echo "tag: ${TAG_VERSION}"
17+
echo "metainfo: ${METAINFO_VERSION}"
18+
if [ "${TAG_VERSION}" != "${METAINFO_VERSION}" ]; then
19+
echo "version from tag different from metainfo, please check you updated the metainfo file for this version tag" 1>&2
20+
exit 1
21+
fi

0 commit comments

Comments
 (0)