Skip to content

Commit

Permalink
test flathub pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 31, 2024
1 parent ea76444 commit a481915
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/publish-studio-linux-flathub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
steps:
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Checkout the target repository
uses: actions/checkout@v4
with:
Expand All @@ -22,30 +26,40 @@ jobs:
uses: actions/checkout@v4
with:
path: source-repo

- uses: mavrosxristoforos/[email protected]
name: Get Version
id: get-oneware-version
with:
xml-file: 'source-repo/build/props/Base.props'
xpath: "//*[local-name()='Project']/*[local-name()='PropertyGroup']/*[local-name()='StudioVersion']"

- name: Update Nuget Sources
run: |
curl -o flatpak-dotnet-generator.py https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/dotnet/flatpak-dotnet-generator.py
./flatpak-dotnet-generator.py --dotnet 8 -f 23.08 -r linux-x64 oneware-nuget-sources.json ./source-repo/studio/OneWare.Studio.Desktop/OneWare.Studio.Desktop.csproj
- name: Delete the source repository
run: rm -rf source-repo

- name: Update Version
run: |
sed -i 's/tag: .*/tag: ${{ steps.get-oneware-version.outputs.info }}/' com.one_ware.OneWare.yml
- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
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@v6
with:
token: ${{ secrets.HENDRIK_PERSONAL_TOKEN }}
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 to ${{ steps.get-oneware-version.outputs.info }}"
labels: |
update
automated pr
git add oneware-nuget-sources.json
git commit -m "Update OneWare Version"
# - name: Push changes and create pull request
# uses: peter-evans/create-pull-request@v6
# with:
# token: ${{ secrets.HENDRIK_PERSONAL_TOKEN }}
# 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 to ${{ steps.get-oneware-version.outputs.info }}"
# labels: |
# update
# automated pr

0 comments on commit a481915

Please sign in to comment.