From 2ac56e68d93e7ef8c22c4bec700cb40778aa768d Mon Sep 17 00:00:00 2001 From: Gerrit Edzards Date: Tue, 27 Aug 2024 13:57:39 +0200 Subject: [PATCH] The build and release workflow sets the current version now --- .github/workflows/build.yml | 3 +++ README.md | 2 +- Set-Version.ps1 | 3 +-- Set-Version.txt => versioninfo.txt | 0 4 files changed, 5 insertions(+), 3 deletions(-) rename Set-Version.txt => versioninfo.txt (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea4da56..a97e2e6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,9 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Set version + shell: powershell + run: powershell -file .\$GITHUB_WORKSPACE\Set-Version.ps1 - name: Add MSBuild to the PATH uses: microsoft/setup-msbuild@v1 - name: Restore the application diff --git a/README.md b/README.md index df31afe..692e4ca 100644 --- a/README.md +++ b/README.md @@ -58,4 +58,4 @@ To debug the _AmagnoVirtualPrinter_, run the msi. After installation, go to _Win ## Create Release To create a release, you have to tag a commit. Then the release pipeline compiles the source code, builds the installation, and creates the release on GitHub. -Use change-version.ps1 to update the assembly and file version of all files and the setup. \ No newline at end of file +Use Set-Version.ps1 and versioninfo.txt to update the assembly and file version of all files and the setup. \ No newline at end of file diff --git a/Set-Version.ps1 b/Set-Version.ps1 index e2e86a8..5932a43 100644 --- a/Set-Version.ps1 +++ b/Set-Version.ps1 @@ -1,5 +1,4 @@ -# Define the new version numbers -$newVersion = Get-Content "Set-Version.txt" +$newVersion = Get-Content "versioninfo.txt" # Use the current directory as the root directory $rootDirectory = Get-Location diff --git a/Set-Version.txt b/versioninfo.txt similarity index 100% rename from Set-Version.txt rename to versioninfo.txt