Skip to content

Commit d9a1a4d

Browse files
committed
Release action: Add version check
1 parent 8f7b690 commit d9a1a4d

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/deploy-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ jobs:
1717
- *checkout
1818
- *setup-dotnet
1919
- *setup-nuget
20+
- name: Setup Verlite
21+
run: |
22+
verlite_version="$(grep '"Verlite\.MsBuild"' Directory.Build.props | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')"
23+
dotnet tool install --global Verlite.CLI --version "$verlite_version"
24+
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim
25+
- name: Verify tag
26+
run: |
27+
[[ "v$(verlite .)" == "${GITHUB_REF#refs/*/}" ]] # error out if the versions don't match
2028
- *restore
2129
- *build
2230
- *test

.github/workflows/deploy-release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
dotnet nuget update source csgals --store-password-in-clear-text --username CSGALS --password ${{ secrets.GITHUB_TOKEN }}
3636
dotnet nuget enable source csgals
3737
38+
- name: Setup Verlite
39+
run: |
40+
verlite_version="$(grep '"Verlite\.MsBuild"' Directory.Build.props | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')"
41+
dotnet tool install --global Verlite.CLI --version "$verlite_version"
42+
verlite . --enable-shadow-repo --auto-fetch --verbosity verbatim
43+
- name: Verify tag
44+
run: |
45+
[[ "v$(verlite .)" == "${GITHUB_REF#refs/*/}" ]] # error out if the versions don't match
3846
- name: Restore
3947
run: dotnet restore
4048

0 commit comments

Comments
 (0)