From e68e052bbb3ed498da02f8239c345779e6ec57ed Mon Sep 17 00:00:00 2001 From: Mateusz Skoczek Date: Mon, 11 Mar 2024 00:21:34 +0100 Subject: [PATCH] Create push_master.yml --- .github/workflows/push_master.yml | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/push_master.yml diff --git a/.github/workflows/push_master.yml b/.github/workflows/push_master.yml new file mode 100644 index 0000000..e318061 --- /dev/null +++ b/.github/workflows/push_master.yml @@ -0,0 +1,51 @@ +name: Build and publish application on master push + + +on: + push: + branches: + - "master" + paths: + - "VDownload**" + + +jobs: + build: + name: Build + runs-on: windows-latest + steps: + - name: Setup GitVersion + uses: gittools/actions/gitversion/setup@v0.9.7 + with: + versionSpec: 5.x + - name: Determine Version + uses: gittools/actions/gitversion/execute@v0.9.7 + id: gitversion + with: + useConfigFile: true + configFilePath: ./.github/config/gitversion.yml + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set version in VDownload.csproj file + id: package_version + uses: KageKirin/set-csproj-version@v0 + with: + file: VDownload/VDownload.csproj + version: ${{steps.gitversion.outputs.SemVer}} + - name: Set version in Package.appxmanifest file + uses: Nambers/ReplaceStringInFile@v1.3 + with: + path: VDownload/Package.appxmanifest + oldString: "Version=\"0.0.0.0\"" + newString: "Version=\"${{steps.gitversion.outputs.major}}.${{steps.gitversion.outputs.minor}}.${{steps.gitversion.outputs.patch}}.0\"" + showFileContent: true + - name: Set version in app.manifest file + uses: Nambers/ReplaceStringInFile@v1.3 + with: + path: VDownload/app.manifest + oldString: "assemblyIdentity version=\"0.0.0.0\"" + newString: "assemblyIdentity version=\"${{steps.gitversion.outputs.major}}.${{steps.gitversion.outputs.minor}}.${{steps.gitversion.outputs.patch}}.0\"" + showFileContent: true +