-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (43 loc) · 1.63 KB
/
publish-studio-all.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This workflow tests the run configuration and starts pipelines for all platforms
name: Publish Studio Desktop
on:
workflow_dispatch:
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: mavrosxristoforos/[email protected]
name: Get Version from Base.props
id: get-props-version
with:
xml-file: "./build/props/Base.props"
xpath: "//*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='StudioVersion']"
- uses: mavrosxristoforos/[email protected]
name: Get Version from Metainfo
id: get-metainfo-version
with:
xml-file: "./studio/OneWare.Studio.Desktop/com.one_ware.OneWare.metainfo.xml"
xpath: "//*[local-name()='component']/*[local-name()='releases']/*[local-name()='release'][1]/@version"
- name: Compare versions
run: |
# Definierte Version zum Vergleich
expected_version="${{ steps.get-props-version.outputs.info }}"
latest_version="${{ steps.get-metainfo-version.outputs.info }}"
echo "Expected version: $expected_version"
echo "Latest version: $latest_version"
if [ "$latest_version" != "$expected_version" ]; then
echo "Error: Versions do not match!"
exit 1
else
echo "Success: Versions match!"
fi
- uses: ncipollo/release-action@v1
with:
tag: ${{ steps.get-props-version.outputs.info }}
allowUpdates: true
generateReleaseNotes: true