Merge branch 'master' of https://github.com/YY-Tech/YYApi
This commit is contained in:
@@ -0,0 +1,34 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on: [create]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Project
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Setup .NET Core
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '3.1.101'
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build MonkeyDotNet/Monkey
|
||||||
|
|
||||||
|
publish:
|
||||||
|
needs: build
|
||||||
|
name: Publish Project to Nuget
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: Setup .NET Core
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '3.1.101'
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
version=`git describe --tags`
|
||||||
|
dotnet pack --configuration release -p:PackageVersion=$version
|
||||||
|
dotnet nuget push bin/release/Monkey.$version.nupkg -k ${APIKEY} -s https://www.nuget.org/api/v2/package
|
||||||
|
env:
|
||||||
|
APIKEY: ${{ secrets.APPKEY }}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
name: PublishToNuget
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: publish to nuget
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 2
|
|
||||||
- name: Publish NuGet
|
|
||||||
uses: rohith/publish-nuget@v1.0.3
|
|
||||||
with:
|
|
||||||
nuget_key: ${{ secrets.NugetKey }}
|
|
||||||
Reference in New Issue
Block a user