Publish Studio Desktop #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |