Skip to content

Commit 1752237

Browse files
committed
Enable publish in GH Actions for PR
1 parent 5190ad7 commit 1752237

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

.github/workflows/default.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,31 @@ jobs:
3535
cd UnitTest
3636
dotnet test Orleans.Providers.MongoDB.UnitTest.csproj --configuration Release
3737
38-
# publish:
39-
# needs: build
40-
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
41-
# runs-on: ubuntu-latest
42-
#
43-
# steps:
44-
# - uses: actions/checkout@v4
45-
# with:
46-
# submodules: recursive
47-
# fetch-depth: 0
48-
#
49-
# - name: Get version from tag
50-
# id: get_version
51-
# run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
52-
#
53-
# - name: Setup .NET Core
54-
# uses: actions/setup-dotnet@v4
55-
# with:
56-
# dotnet-version: 8.0.x
57-
#
58-
# - name: Pack
59-
# run: |
60-
# cd Orleans.Providers.MongoDB
61-
# dotnet pack --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
62-
#
63-
# - name: Publish
64-
# run: |
65-
# dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }}
38+
publish:
39+
needs: build
40+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
fetch-depth: 0
48+
49+
- name: Get version from tag
50+
id: get_version
51+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
52+
53+
- name: Setup .NET Core
54+
uses: actions/setup-dotnet@v4
55+
with:
56+
dotnet-version: 8.0.x
57+
58+
- name: Pack
59+
run: |
60+
cd Orleans.Providers.MongoDB
61+
dotnet pack --configuration Release /p:Version=${{ steps.get_version.outputs.VERSION }}
62+
63+
- name: Publish
64+
run: |
65+
dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }}

0 commit comments

Comments
 (0)