Skip to content

Commit 9164ebc

Browse files
committed
2 parents 6beb01c + d6d0bd9 commit 9164ebc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/Deploy.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,18 @@ jobs:
2020
- name: Restore dependencies
2121
run: dotnet restore
2222

23-
- name: Publish Windows Forms App with ClickOnce
23+
- name: Publish Windows Forms App with ClickOnce without version
24+
if: "!startsWith(github.ref, 'refs/tags/')"
2425
run: dotnet publish -c Release -r win-x64 --self-contained false /p:PublishSingleFile=true /p:ClickOnceDeploymentBuild=true /p:PublishProfile="./QuickIPchange/My Project/PublishProfiles/ClickOnceProfile.pubxml"
26+
27+
- name: Get the version Tag
28+
if: startsWith(github.ref, 'refs/tags/')
29+
id: vars
30+
run: echo ${{ github.ref_name }}
31+
32+
- name: Publish Windows Forms App with ClickOnce with version
33+
if: startsWith(github.ref, 'refs/tags/')
34+
run: dotnet publish -c Release -r win-x64 --self-contained false /p:PublishSingleFile=true /p:ClickOnceDeploymentBuild=true /p:PublishProfile="./QuickIPchange/My Project/PublishProfiles/ClickOnceProfile.pubxml" /p:AssemblyVersion=${{ github.ref_name }} /p:Version=${{ github.ref_name }}
2535

2636
- name: Upload Artifact
2737
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)