Skip to content

Commit

Permalink
Try to fix NuGet
Browse files Browse the repository at this point in the history
  • Loading branch information
dpogue committed Dec 31, 2024
1 parent e60619f commit 8859b82
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

# Install Mono on Ubuntu to run nuget.exe (due to this issue on Ubuntu 24 that hasn't been fixed yet - https://github.com/NuGet/setup-nuget/issues/168)
- name: Set up Mono on Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
- name: Install dependencies
run: |
sudo apt-get update
Expand All @@ -206,6 +214,7 @@ jobs:
libcairo2 \
libsecret-1-dev \
libtool \
mono-complete \
nasm \
ninja-build \
qtbase5-dev
Expand All @@ -215,12 +224,20 @@ jobs:
with:
cmake-version: '3.29.2'

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.x'
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- uses: nuget/setup-nuget@v2

- name: Setup NuGet
run: |
nuget sources add \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
-storepasswordincleartext \
-name "GitHub" \
-username "${{ github.repository_owner }}" \
-password "${{ secrets.GITHUB_TOKEN }}"
nuget setapikey \
"${{ secrets.GITHUB_TOKEN }}" \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: Configure
run: |
Expand All @@ -234,7 +251,7 @@ jobs:
-DVCPKG_INSTALL_OPTIONS=--clean-after-build \
-S . -B build
env:
VCPKG_BINARY_SOURCES: "clear;nuget,Source,readwrite"
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"

- name: Build
run: |
Expand Down

0 comments on commit 8859b82

Please sign in to comment.