Publish Studio Desktop for Linux in Flathub #8
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
name: Publish Studio Desktop for Linux in Flathub | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: [ Publish Studio Desktop ] | |
types: | |
- completed | |
jobs: | |
deploy-flathub: | |
name: Deploy in Flathub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
- uses: mavrosxristoforos/[email protected] | |
name: Get Version | |
id: get-oneware-version | |
with: | |
xml-file: './build/props/Base.props' | |
xpath: "//*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='StudioVersion']" | |
- name: Checkout the target repository | |
uses: actions/checkout@v4 | |
with: | |
repository: one-ware/com.one_ware.OneWare | |
token: ${{ secrets.HENDRIK_PERSONAL_TOKEN }} | |
path: target-repo | |
- name: Make changes to the target repository | |
run: | | |
cd target-repo | |
sed -i 's/tag: .*/tag: ${{ steps.get-oneware-version.outputs.info }}/' com.one_ware.OneWare.yml | |
- name: Commit changes | |
run: | | |
cd target-repo | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git checkout -b release-${{ steps.get-oneware-version.outputs.info }}/ | |
git add com.one_ware.OneWare.yml | |
git commit -m "Update com.one_ware.OneWare.yml" | |
- name: Push changes and create pull request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
token: ${{ secrets.HENDRIK_PERSONAL_TOKEN}} | |
repository: one-ware/com.one_ware.OneWare | |
branch: release-${{ steps.get-oneware-version.outputs.info }}/ | |
title: "Update Version to ${{ steps.get-oneware-version.outputs.info }}" | |
body: "This is an automated pull request to update the version." |