From 874f5b6cefeb1ed8c78f9680bf75e55df697c19e Mon Sep 17 00:00:00 2001 From: xRain Date: Mon, 3 Feb 2020 03:05:39 +0800 Subject: [PATCH 1/3] tag to nuget --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1e9f94c --- /dev/null +++ b/.github/workflows/main.yml @@ -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.0' + - 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.0' + - 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 }} From fdfde570c7f70417b1873daec9fe18e4f328fd1c Mon Sep 17 00:00:00 2001 From: xRain Date: Mon, 3 Feb 2020 03:05:58 +0800 Subject: [PATCH 2/3] Delete publish-nuget.yml --- .github/workflows/publish-nuget.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/workflows/publish-nuget.yml diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml deleted file mode 100644 index f48ee91..0000000 --- a/.github/workflows/publish-nuget.yml +++ /dev/null @@ -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 }} From 5a04f831a7df8e3fdc6171653505e20c223b0dcc Mon Sep 17 00:00:00 2001 From: xRain Date: Mon, 3 Feb 2020 03:11:01 +0800 Subject: [PATCH 3/3] Update main.yml --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e9f94c..fa06097 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.0' + dotnet-version: '3.1.101' - name: Build run: dotnet build MonkeyDotNet/Monkey @@ -24,7 +24,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '3.1.0' + dotnet-version: '3.1.101' - name: Publish run: | version=`git describe --tags`