Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-10-15 06:12:46 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-10-15 09:02:39 +0300
commit1c225a2c9385887ff1b5267637a0c89bd8769365 (patch)
treed82cddb1ff1b8e628204bdaee2347701d5c898af /.github
parent502f9183d8618437d5ec2ff9ba874ec60a27b3bf (diff)
Setup vcpkg and NuGet in the same CI step
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/windows-msvc.yml65
1 files changed, 32 insertions, 33 deletions
diff --git a/.github/workflows/windows-msvc.yml b/.github/workflows/windows-msvc.yml
index 2720a785f..a9783e950 100644
--- a/.github/workflows/windows-msvc.yml
+++ b/.github/workflows/windows-msvc.yml
@@ -9,7 +9,6 @@ concurrency:
env:
VCPKG_ROOT: C:\vcpkg
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
- GH_NUGET_REGISTRY: https://nuget.pkg.github.com/dosbox-staging/index.json
jobs:
build_windows_vs:
@@ -31,23 +30,23 @@ jobs:
with:
submodules: false
- - name: Prepare VCPKG
- id: prep-vcpkg
- shell: pwsh
+ - name: Setup vcpkg and NuGet
+ shell: bash
run: |
- ${{ env.VCPKG_ROOT }}\bootstrap-vcpkg.bat
- echo "::set-output name=nuget_bin::$(${{ env.VCPKG_ROOT }}\vcpkg.exe fetch nuget)"
-
- - name: 'Setup NuGet Credentials'
- shell: pwsh
- run: >-
- ${{ steps.prep-vcpkg.outputs.nuget_bin }}
- sources add
- -source "${{ env.GH_NUGET_REGISTRY }}"
- -storepasswordincleartext
- -name "GitHub"
- -username "dosbox-staging"
- -password "${{ secrets.GITHUB_TOKEN }}"
+ set -euo pipefail
+ cd "${{ env.VCPKG_ROOT }}"
+ ./bootstrap-vcpkg.sh -disableMetrics
+ nuget=$(./vcpkg.exe fetch nuget | tail -n 1)
+ owner="${GITHUB_REPOSITORY%/*}"
+ source_url="https://nuget.pkg.github.com/$owner/index.json"
+ "$nuget" sources add \
+ -source "$source_url" \
+ -storepasswordincleartext \
+ -name "GitHub" \
+ -username "$owner" \
+ -password "${{ secrets.GITHUB_TOKEN }}"
+ "$nuget" setapikey "${{ secrets.GITHUB_TOKEN }}" \
+ -source "$source_url"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1
@@ -114,23 +113,23 @@ jobs:
with:
submodules: false
- - name: Prepare VCPKG
- id: prep-vcpkg
- shell: pwsh
+ - name: Setup vcpkg and NuGet
+ shell: bash
run: |
- ${{ env.VCPKG_ROOT }}\bootstrap-vcpkg.bat
- echo "::set-output name=nuget_bin::$(${{ env.VCPKG_ROOT }}\vcpkg.exe fetch nuget)"
-
- - name: 'Setup NuGet Credentials'
- shell: pwsh
- run: >-
- ${{ steps.prep-vcpkg.outputs.nuget_bin }}
- sources add
- -source "${{ env.GH_NUGET_REGISTRY }}"
- -storepasswordincleartext
- -name "GitHub"
- -username "dosbox-staging"
- -password "${{ secrets.GITHUB_TOKEN }}"
+ set -euo pipefail
+ cd "${{ env.VCPKG_ROOT }}"
+ ./bootstrap-vcpkg.sh -disableMetrics
+ nuget=$(./vcpkg.exe fetch nuget | tail -n 1)
+ owner="${GITHUB_REPOSITORY%/*}"
+ source_url="https://nuget.pkg.github.com/$owner/index.json"
+ "$nuget" sources add \
+ -source "$source_url" \
+ -storepasswordincleartext \
+ -name "GitHub" \
+ -username "$owner" \
+ -password "${{ secrets.GITHUB_TOKEN }}"
+ "$nuget" setapikey "${{ secrets.GITHUB_TOKEN }}" \
+ -source "$source_url"
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.1