This repository has been archived on 2022-08-05. You can view files and clone it, but cannot push or open issues or pull requests.
Cashew/.gitlab-ci.yml
2020-06-21 05:43:03 +00:00

44 lines
2.0 KiB
YAML

.shared_windows_runners:
tags:
- windows
before_script:
- dotnet restore
uptool:
extends:
- .shared_windows_runners
stage: deploy
script: |
$(new-object System.Net.WebClient).DownloadFile("https://gitlab.com/JFronny/UpTool2/-/jobs/artifacts/master/raw/Tools.zip?job=uptool", "$($(pwd).Path)\Tools.zip")
& "C:\Program Files\7-Zip\7z.exe" x .\Tools.zip
rm Tools.zip
rm Install.bat
rm Remove.bat
mkdir .\build
#dotnet publish -o .\build -c Release
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" -noLogo -verbosity:m -p:Configuration=Release
cp .\cashew\bin\Release\net461\* .\build\
cp .\build\package.zip .\
$file = Get-Item $(Resolve-Path .\build\*.exe).Path
[timespan]$span = [System.DateTime]::Now - [datetime]'01/01/2000'
[System.XML.XMLDocument]$xml=New-Object System.XML.XMLDocument
[System.XML.XMLElement]$app=$xml.CreateElement("app")
$xml.appendChild($app)
$app.appendChild($xml.CreateElement("Name")).InnerText = "Cashew"
$app.appendChild($xml.CreateElement("Description")).InnerText = "A basic GUI for multiple common programming languages including c# and HTML"
$app.appendChild($xml.CreateElement("Version")).InnerText = "1.0." + $span.Days.ToString() + "." + [math]::Round(($span.Seconds + ($span.Minutes + $span.Hours * 60) * 60) / 2).ToString()
$app.appendChild($xml.CreateElement("ID")).InnerText = "63d64672-3ca3-4760-96a3-443b262d326f"
$app.appendChild($xml.CreateElement("File")).InnerText = $CI_PROJECT_URL + "/-/jobs/" + $CI_JOB_ID + "/artifacts/raw/package.zip"
$app.appendChild($xml.CreateElement("Hash")).InnerText = $(Get-FileHash .\package.zip).Hash
$app.appendChild($xml.CreateElement("MainFile")).InnerText = "cashew.exe"
$app.appendChild($xml.CreateElement("Icon")).InnerText = "https://gitlab.com/JFronny/cashew/-/raw/master/cashew/Cashew-64.ico"
echo NULL > app.xml
$xml.save($(gi .\app.xml).Fullname)
artifacts:
paths:
- package.zip
- app.xml
only:
- master