Skip to content

Commit

Permalink
fix nuget sources setup
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisInSky committed Nov 26, 2024
1 parent 0c0d4e2 commit 23cb056
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/net-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
with:
dotnet-version: 8.0.x

- name: Restore Solution
- name: Set Up NuGet Sources
run: |
NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget remove source ${{ github.repository_owner }}-github || true
Expand All @@ -43,6 +43,9 @@ jobs:
--username "${{ github.workflow }}" \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text
- name: Restore Solution
run: |
dotnet restore
- name: Build Solution
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/net-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ jobs:
pattern: native_client_gen_*
merge-multiple: true

- name: Set Up NuGet Sources
run: |
NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget remove source ${{ github.repository_owner }}-github || true
dotnet nuget add source $NUGET_SOURCE_URL \
--name ${{ github.repository_owner }}-github \
--username "${{ github.workflow }}" \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text
- name: Build Solution
run: |
dotnet build --configuration Release -p:LibraryRoot=${{ github.workspace }}/native_client_gens
Expand All @@ -168,11 +178,5 @@ jobs:
- name: Publish NuGet Packages
run: |
NUGET_SOURCE_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget add source $NUGET_SOURCE_URL \
--name ${{ github.repository_owner }}-github \
--username "${{ github.workflow }}" \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text
dotnet nuget push ./nugets/*.nupkg \
--source $NUGET_SOURCE_URL

0 comments on commit 23cb056

Please sign in to comment.