File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed
Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1+ import re
2+
3+ version_regex = r"Version>(\d+\.\d+\.\d+)<"
4+
5+ with open ("Server/Server.csproj" ) as f :
6+ text = f .read ()
7+
8+ version = re .findall (version_regex , text )
9+ version = "1.0.0" if not version else version [0 ]
10+ print (version )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Build and Deploy
22
33env :
44 ACTIONS_ALLOW_UNSECURE_COMMANDS : true
5- release-action : whatever
5+ release-action : yes
66
77on :
88 push :
1212 - ' *.md'
1313 - ' .idea/*'
1414 - ' .vs/*'
15+ - ' *.yml'
16+
1517
1618concurrency :
1719 group : " build-and-release"
2224 name : Build and deploy
2325 runs-on : windows-latest
2426 steps :
25- - uses : actions/checkout@v2
27+ - uses : actions/checkout@v3
2628
2729 - uses : actions/setup-dotnet@v2
2830 with :
@@ -31,15 +33,24 @@ jobs:
3133 - name : Setup NuGet
32343335
36+ - uses : actions/setup-python@v4
37+ with :
38+ python-version : ' 3.6.x'
39+ architecture : ' x64'
40+
3441 - name : Build
3542 run : dotnet publish -c=Release
43+
44+ - name : Set-tag-env
45+ run : |
46+ "RE_TAG_NAME=$(python .github/scripts/get_version_tag.py)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3647
3748 - name : Publish the build
3849 uses : " marvinpinto/action-automatic-releases@latest"
3950 with :
40- repo_token : " ${{ secrets.GITHUB_TOKEN }}"
41- automatic_release_tag : " latest "
42- prerelease : true
51+ repo_token : " ${{ secrets.REPO_TOKEN }}"
52+ automatic_release_tag : " v${{ env.RE_TAG_NAME }} "
53+ prerelease : false
4354 title : " Automatic Build"
4455 files : |
4556 Server/bin/*/net35/ServerEmulator.dll
Original file line number Diff line number Diff line change 33 <TargetFramework >net35</TargetFramework >
44 <AssemblyName >ServerEmulator</AssemblyName >
55 <Description >INVAXION Server Emulator</Description >
6- <Version >1.0.0 </Version >
6+ <Version >1.0.2 </Version >
77 <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
88 <LangVersion >latest</LangVersion >
99 </PropertyGroup >
You can’t perform that action at this time.
0 commit comments