This commit is contained in:
J. Fronny 2020-04-07 20:41:25 +02:00 committed by GitHub
parent 830c193a56
commit 9773f653ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

View File

@ -13,23 +13,27 @@ jobs:
- name: Build
id: base_init
run: |
echo "download tools"
$(new-object System.Net.WebClient).DownloadFile("https://www.github.com/JFronny/UpTool2/releases/latest/download/Tools.zip", "$($(pwd).Path)\Tools.zip")
echo "unzip"
& "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip
echo "remove leftovers"
rm Tools.zip
rm Install.bat
rm Remove.bat
echo "restore"
dotnet restore
echo "BUILD
echo "build
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release
echo "COPY"
echo "copy"
cp *\bin\Release\net461\package.zip .
echo "GET_TIMESPAN"
echo "get timespan"
[timespan]$span = [System.DateTime]::Now - [datetime]'01/01/2000'
echo "GET_VERSION"
echo "get version"
[version]$ver = [version]("1.0." + $span.Days.ToString() + "." + ($span.Seconds / 2).ToString())
echo "GET_STR"
echo "get version string"
$asmver = $ver.ToString()
echo "SET_STR"
echo "set output"
echo "::set-output name=vers::$asmver"
- name: Create Release
id: create_release