Skip to content

Commit f8df972

Browse files
committed
GHA workflow: publish to NuGet on tag
1 parent 0cca7b5 commit f8df972

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/publish.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,18 @@ jobs:
77
publish:
88
runs-on: ubuntu-latest
99
steps:
10-
- id: echo
11-
run: echo "hello $GITHUB_REF"
10+
- uses: actions/setup-dotnet@v1
11+
- uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.event.release.tag_name }}
14+
fetch-depth: 0
15+
- run: dotnet build --configuration Release
16+
- name: pack
17+
run: >
18+
dotnet pack mongo-declarative-indexes/mongo-declarative-indexes.csproj \
19+
--no-build \
20+
--configuration Release \
21+
-p:PackageVersion=${{ github.event.release.tag_name }} \
22+
--output .
23+
- name: push
24+
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}

0 commit comments

Comments
 (0)