Publish Studio Desktop #98
This file contains hidden or 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: | |
| permissions: | |
| contents: read | |
| jobs: | |
| # CRA Annex I Part I(1) release gate: block the release — and the platform | |
| # publish pipelines that cascade from it — if any dependency has a known | |
| # vulnerability. | |
| scan: | |
| name: Dependency vulnerability gate | |
| uses: ./.github/workflows/dependency-scan.yml | |
| release: | |
| name: Release | |
| needs: scan | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - uses: mavrosxristoforos/get-xml-info@2.0 | |
| 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/get-xml-info@2.0 | |
| 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: | | |
| 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 | |
| # - name: Check if public plugin repository exists for current version | |
| # run: | | |
| # URL="https://raw.githubusercontent.com/one-ware/OneWare.PublicPackages/${{ steps.get-props-version.outputs.info }}/oneware-packages.json" | |
| # echo "Checking URL: $URL" | |
| # response=$(curl -s -w "%{http_code}" -o response.json "$URL") | |
| # if [ "$response" -ne 200 ]; then | |
| # echo "Error: Failed to fetch URL. HTTP status code: $response" | |
| # exit 1 | |
| # fi | |
| # | |
| # python -c "import json; json.load(open('response.json'))" && echo "Valid JSON" || exit 1 | |
| - uses: ncipollo/release-action@v1 | |
| with: | |
| tag: ${{ steps.get-props-version.outputs.info }} | |
| allowUpdates: true | |
| generateReleaseNotes: true |