Skip to content

Commit 27e6629

Browse files
ci: fixed output
1 parent 1240a92 commit 27e6629

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929

3030
# Nuget Setup
3131
NUGET_VERSION: 'latest'
32-
NUGET_OUTPUT: '.output/'
32+
NUGET_OUTPUT: 'output'
33+
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
34+
NUGET_FEED: https://api.nuget.org/v3/index.json
3335

3436
steps:
3537
- name: Checkout reference commit
@@ -110,12 +112,32 @@ jobs:
110112
nuget pack "$nuspecFile" `
111113
-Version ${{ env.VERSION }} `
112114
-Properties "Configuration=${{ env.CONFIG }};CopyrightYear=$(Get-Date -Format yyyy)"`
113-
-OutputDirectory ${{ env.NUGET_OUTPUT }}
115+
-OutputDirectory ${{ github.workspace }}/${{ env.NUGET_OUTPUT }}
114116
}
115117
116118
- name: Upload build artifact
117119
if: ${{ github.event_name != 'pull_request' }}
118120
uses: actions/upload-artifact@v4
119121
with:
120-
name: build_${{ env.PROJECT_NAME }}.${{ env.VERSION }}
122+
name: ${{ env.PROJECT_NAME }}.${{ env.VERSION }}
121123
path: ${{ github.workspace }}/${{ env.NUGET_OUTPUT }}
124+
125+
- name: Download build artifact
126+
uses: actions/download-artifact@v4
127+
with:
128+
name: ${{ env.PROJECT_NAME }}.${{ env.VERSION }}
129+
path: ${{ github.workspace }}/${{ env.NUGET_OUTPUT }}
130+
131+
- name: Configure NuGet
132+
uses: nuget/setup-nuget@v2
133+
with:
134+
nuget-version: ${{ env.NUGET_VERSION }}
135+
136+
- name: Push to NuGet Feed
137+
shell: bash
138+
working-directory: ${{ env.NUGET_OUTPUT }}
139+
run: |
140+
for nugetFile in ./*.nupkg
141+
do
142+
nuget push $nugetFile ${{ env.NUGET_TOKEN }} -Source ${{ env.NUGET_FEED }}
143+
done

.github/workflows/release-nuget.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
env:
1414
# Nuget Setup
1515
NUGET_VERSION: 'latest'
16-
NUGET_OUTPUT: ${{ github.workspace }}/nuget/
16+
NUGET_OUTPUT: 'output'
1717
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
1818
NUGET_FEED: https://api.nuget.org/v3/index.json
1919

@@ -34,13 +34,13 @@ jobs:
3434
echo "VERSION=$tag_check" >> $GITHUB_ENV
3535
3636
- name: Download a single artifact
37-
uses: aochmann/actions-download-artifact@1.0.2
37+
uses: actions/download-artifact@v4
3838
with:
39-
name: build_${{ env.PROJECT_NAME }}.${{ env.VERSION }}
40-
path: ${{ env.NUGET_OUTPUT }}
39+
name: ${{ env.PROJECT_NAME }}.${{ env.VERSION }}
40+
path: ${{ github.workspace }}/${{ env.NUGET_OUTPUT }}
4141

4242
- name: Configure NuGet
43-
uses: nuget/setup-nuget@v1
43+
uses: nuget/setup-nuget@v2
4444
with:
4545
nuget-version: ${{ env.NUGET_VERSION }}
4646

0 commit comments

Comments
 (0)