Skip to content

Commit 7e4036b

Browse files
moved release to it's own yaml file
1 parent 1789750 commit 7e4036b

2 files changed

Lines changed: 42 additions & 31 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,9 @@ env:
1212
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
1313
DOTNET_CLI_TELEMETRY_OPTOUT: true
1414

15-
VSTEST_CONNECTION_TIMEOUT: 900
16-
SOLUTION_NAME: GeoJSON.Text
17-
1815
# Project name to pack and publish
1916
PROJECT_NAME: GeoJSON.Text
2017

21-
# Official NuGet Feed settings
22-
NUGET_FEED: https://api.nuget.org/v3/index.json
23-
NUGET_KEY: ${{ secrets.NUGET_KEY }}
24-
2518
jobs:
2619
build:
2720

@@ -54,27 +47,3 @@ jobs:
5447
with:
5548
name: nupkg
5649
path: src/${{ env.PROJECT_NAME }}/bin/Release/*.nupkg
57-
58-
deploy:
59-
name: 'Deploy to Nuget'
60-
if: github.event_name == 'release'
61-
needs: build
62-
runs-on: ubuntu-latest
63-
64-
steps:
65-
- uses: actions/checkout@v2
66-
- name: Setup .NET Core
67-
uses: actions/setup-dotnet@v1
68-
with:
69-
dotnet-version: |
70-
3.1.x
71-
5.0.x
72-
6.0.x
73-
- name: Create Release NuGet package
74-
run: |
75-
arrTag=(${GITHUB_REF//\// })
76-
VERSION="${arrTag[2]}"
77-
VERSION="${VERSION//v}"
78-
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.csproj
79-
- name: Push to Nuget
80-
run: dotnet nuget push nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Build and Test'
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
env:
9+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
10+
DOTNET_CLI_TELEMETRY_OPTOUT: true
11+
12+
# Project name to pack and publish
13+
PROJECT_NAME: GeoJSON.Text
14+
15+
# Official NuGet Feed settings
16+
NUGET_FEED: https://api.nuget.org/v3/index.json
17+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
18+
19+
jobs:
20+
deploy:
21+
name: 'Deploy to Nuget'
22+
if: github.event_name == 'release'
23+
needs: build
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Setup .NET Core
29+
uses: actions/setup-dotnet@v1
30+
with:
31+
dotnet-version: |
32+
3.1.x
33+
5.0.x
34+
6.0.x
35+
- name: Create Release NuGet package
36+
run: |
37+
arrTag=(${GITHUB_REF//\// })
38+
VERSION="${arrTag[2]}"
39+
VERSION="${VERSION//v}"
40+
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/$PROJECT_NAME/$PROJECT_NAME.csproj
41+
- name: Push to Nuget
42+
run: dotnet nuget push nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate

0 commit comments

Comments
 (0)