34 lines
1.2 KiB
YAML
34 lines
1.2 KiB
YAML
name: CD
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Run a multi-line script
|
|
run: |
|
|
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\"
|
|
.\MSBuild.exe $Env:GITHUB_WORKSPACE\UpTool2.sln -p:Configuration=Release -m
|
|
.\MSBuild.exe $Env:GITHUB_WORKSPACE\UpTool2.sln -p:Configuration=Debug -m
|
|
cd "C:\Program Files\7-Zip\"
|
|
.\7z a $Env:GITHUB_WORKSPACE\Release.zip $Env:GITHUB_WORKSPACE\UpTool2\bin\Release
|
|
cd $Env:GITHUB_WORKSPACE\UpTool2\bin\Release
|
|
$asmver = $([Reflection.Assembly]::Loadfile($(pwd).Path + "\\UpTool2.exe").GetName().version.ToString())
|
|
cd $Env:GITHUB_WORKSPACE
|
|
$xml = New-Object XML
|
|
$xml.load("Meta.xml")
|
|
$xml.meta.Hash = $(Get-FileHash .\Release.zip).Hash
|
|
$xml.meta.Version = $asmver
|
|
$xml.meta.File = "https://github.com/CreepyCrafter24/UpTool2/raw/master/Release.zip"
|
|
$xml.save("Meta.xml")
|
|
- uses: matheusalbino/git-commit@v1.0.1
|
|
with:
|
|
user-name: Equal
|
|
user-email: equal@example.com
|
|
message: This a commit from Github Actions
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|