Skip to content

Commit f0c99f8

Browse files
committed
Use full version on release
1 parent 9f4ba11 commit f0c99f8

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ on:
66
branches: [master, develop]
77
pull_request:
88
branches: [master, develop]
9+
release:
910

1011
defaults:
1112
run:
1213
shell: pwsh
1314

15+
env:
16+
VERSION_SUFFIX: alpha-${{ github.run_number }}
17+
1418
jobs:
1519
build:
1620
strategy:
@@ -21,6 +25,10 @@ jobs:
2125
runs-on: windows-latest
2226

2327
steps:
28+
- name: Set VERSION_SUFFIX
29+
if: github.event_name == 'release' && github.event.action == 'created'
30+
run: "'VERSION_SUFFIX=' >> $env:GITHUB_ENV"
31+
2432
- name: Checkout
2533
uses: actions/checkout@v3.1.0
2634

@@ -54,7 +62,7 @@ jobs:
5462
run: nuget restore
5563

5664
- name: Build and package the application
57-
run: msbuild PolyDeploy.sln /m /p:Configuration=$env:Configuration /p:ContinuousIntegrationBuild=true /p:VersionSuffix=alpha-${{ github.run_number }}
65+
run: msbuild PolyDeploy.sln /m /p:Configuration=$env:Configuration /p:ContinuousIntegrationBuild=true /p:VersionSuffix=${{ env.VERSION_SUFFIX }}
5866
env:
5967
Configuration: ${{ matrix.configuration }}
6068

@@ -65,7 +73,7 @@ jobs:
6573
run: dotnet publish PolyDeploy.DeployClient/PolyDeploy.DeployClient.csproj --configuration ${{ matrix.configuration }} --no-build --output dist/
6674

6775
- name: Pack Deploy Client
68-
run: dotnet pack PolyDeploy.DeployClient/PolyDeploy.DeployClient.csproj --configuration ${{ matrix.configuration }} --no-build --output dist/ --version-suffix alpha-${{ github.run_number }}
76+
run: dotnet pack PolyDeploy.DeployClient/PolyDeploy.DeployClient.csproj --configuration ${{ matrix.configuration }} --no-build --output dist/ --version-suffix ${{ env.VERSION_SUFFIX }}
6977

7078
- name: Upload build artifacts
7179
uses: actions/upload-artifact@v3.1.1

0 commit comments

Comments
 (0)