mirror of
https://github.com/sochix/TLSharp.git
synced 2026-01-10 10:49:58 +01:00
Add GithubActions workflow for nugetUpload
This commit is contained in:
parent
932a733197
commit
66942979ab
29
.github/workflows/nugetUpload.yml
vendored
Normal file
29
.github/workflows/nugetUpload.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
name: nugetUpload
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
NUGET_URL: https://dist.nuget.org/win-x86-commandline/v5.4.0/nuget.exe
|
||||||
|
jobs:
|
||||||
|
windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Download Nuget.exe
|
||||||
|
run: Invoke-WebRequest -OutFile Nuget.exe $Env:NUGET_URL
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: ./Nuget.exe restore src/TgSharp.sln
|
||||||
|
|
||||||
|
- name: setup-msbuild
|
||||||
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: Build & Upload Package
|
||||||
|
run: |
|
||||||
|
$date = get-date -format "yyyyMMdd-HHmm"
|
||||||
|
$hash = & git rev-parse --short HEAD
|
||||||
|
|
||||||
|
./Nuget.exe pack src/TgSharp.Core/TgSharp.Core.csproj -Version "0.0.1-date.$date.git.$hash" -Build -Properties Configuration=Release
|
||||||
|
If ($Env:GITHUB_REF -eq 'refs/heads/master' -AND '${{ secrets.NUGET_API_KEY }}' -ne '') {
|
||||||
|
./Nuget.exe push "TgSharp.0.0.1-date.$date.git.$hash.nupkg" ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json
|
||||||
|
}
|
||||||
|
|
@ -15,9 +15,9 @@ It's a perfect fit for any developer who would like to send data directly to Tel
|
||||||
<copyright>Copyright 2015-2020</copyright>
|
<copyright>Copyright 2015-2020</copyright>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="bin\Debug\BigMath.dll" target="lib\net45\BigMath.dll" />
|
<file src="bin\Release\BigMath.dll" target="lib\net45\BigMath.dll" />
|
||||||
<file src="bin\Debug\Ionic.ZLib.dll" target="lib\net45\Ionic.ZLib.dll" />
|
<file src="bin\Release\Ionic.ZLib.dll" target="lib\net45\Ionic.ZLib.dll" />
|
||||||
<file src="bin\Debug\TeleSharp.TL.dll" target="lib\net45\TeleSharp.TL.dll" />
|
<file src="bin\Release\TeleSharp.TL.dll" target="lib\net45\TeleSharp.TL.dll" />
|
||||||
<file src="bin\Debug\TgSharp.Core.dll" target="lib\net45\TgSharp.Core.dll" />
|
<file src="bin\Release\TgSharp.Core.dll" target="lib\net45\TgSharp.Core.dll" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue