Skip to content

Commit 88dcb52

Browse files
committed
move create branch step to the end of the workflow #8
1 parent b1bd339 commit 88dcb52

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

.github/workflows/release-nuget.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: release-nuget
1+
name: Build, Create, and Release a NuGet Package
22

33
on:
44
workflow_dispatch:
@@ -22,15 +22,7 @@ jobs:
2222
- name: Checkout repository
2323
uses: actions/checkout@v2
2424
with:
25-
fetch-depth: 0 # Needed for GitVersion or full history
26-
27-
- name: Create release branch
28-
uses: peterjgrainger/action-create-branch@v2.2.0
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
31-
with:
32-
branch: ${{ env.BRANCH_NAME }}
33-
sha: ${{ github.sha }}
25+
fetch-depth: 0
3426

3527
- name: Setup .NET SDK
3628
uses: actions/setup-dotnet@v3.2.0
@@ -65,3 +57,19 @@ jobs:
6557

6658
- name: Push package to NuGet.org
6759
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
60+
61+
create-release-branch:
62+
runs-on: ubuntu-latest
63+
needs: [build, release]
64+
65+
steps:
66+
- name: Checkout repository
67+
uses: actions/checkout@v2
68+
69+
- name: Create release branch
70+
uses: peterjgrainger/action-create-branch@v2.2.0
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
73+
with:
74+
branch: ${{ env.BRANCH_NAME }}
75+
sha: ${{ github.sha }}

0 commit comments

Comments
 (0)