Create nuget package and push.

This commit is contained in:
Wu, Ganhao 2020-03-27 22:24:36 +08:00
parent 4b74af662b
commit e6bebe42fa
2 changed files with 63 additions and 0 deletions

44
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Push Build
on:
push:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
clean: true
fetch-depth: 1
- name: Setup NuGet
uses: warrenbuckley/Setup-Nuget@v1
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
#with:
# arch: amd64
# toolset: 16.0
- name: CMake
working-directory: .
run: cmake .
- name: Build Release
working-directory: ./build
run: msbuild /m /p:Configuration=Release FMT.sln
- name: Build Debug
working-directory: ./build
run: msbuild /m /p:Configuration=Debug FMT.sln
- name: Nuget Pack
working-directory: .
run: nuget pack fmtlib.nuspec -version 6.1.2 -OutputFileNamesWithoutVersion -OutputDirectory dist
- name: Nuget Push
working-directory: .
run: nuget push dist\fmtlib.nupkg

19
fmtlib.nuspec Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>wuganhao.fmtlib</id>
<version>$version$</version>
<title>{fmt} lib nuget package</title>
<authors>Wu, Ganhao&lt;wuganhao@hotmail.com&gt;</authors>
<owners>Wu, Ganhao&lt;wuganhao@hotmail.com&gt;</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>fmtlib</description>
<releaseNotes>Create fmtlib for VS 2019</releaseNotes>
<tags>fmtlib std::format</tags>
</metadata>
<files>
<file src="Debug\fmtd.lib" target="lib\native\x64\Debug\" />
<file src="Debug\fmtd.lib" target="lib\native\x64\Debug\" />
<file src="include\fmt\*.h" target="build\include\fmt\" />
</files>
</package>