Release Nugget Doom 2.1.0 #152
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration (MSVC) | |
on: | |
push: | |
branches: [ master ] | |
tags: ['*'] | |
paths-ignore: ['**.md'] | |
pull_request: | |
branches: [ master ] | |
paths-ignore: ['**.md'] | |
workflow_dispatch: | |
env: | |
VCPKG_ROOT: C:\vcpkg | |
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite" | |
jobs: | |
build: | |
if: ${{ github.repository == 'MrAlaux/Nugget-Doom' }} | |
name: MSVC ${{ matrix.config.arch }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
config: | |
- { | |
name: x64, | |
arch: x64, | |
} | |
- { | |
name: Win32, | |
arch: x86, | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup vcpkg and NuGet | |
shell: bash | |
run: | | |
set -euo pipefail | |
cd "${{ env.VCPKG_ROOT }}" | |
git pull | |
NUGET=$(vcpkg fetch nuget | tail -n 1) | |
GH_PACKAGES_URL="https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" | |
"$NUGET" sources add \ | |
-source "$GH_PACKAGES_URL" \ | |
-storepasswordincleartext \ | |
-name "GitHub" \ | |
-username "${{ github.repository_owner }}" \ | |
-password "${{ secrets.GITHUB_TOKEN }}" | |
"$NUGET" setapikey "${{ secrets.GITHUB_TOKEN }}" \ | |
-source "$GH_PACKAGES_URL" | |
- name: Configure | |
run: | | |
cmake -B build -A ${{ matrix.config.name }} ` | |
-DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON -DENABLE_LTO=ON ` | |
-DCMAKE_TOOLCHAIN_FILE="${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" ` | |
-DVCPKG_TARGET_TRIPLET="${{ matrix.config.arch }}-windows-static-release" ` | |
-DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" ` | |
-DCMAKE_IGNORE_PATH="C:/Strawberry/perl/bin;C:/Strawberry/c/lib" | |
- name: Build | |
run: cmake --build build --config "Release" | |
- name: Package | |
run: | | |
cd build | |
cpack | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Win-${{ matrix.config.arch }} | |
path: build/*.zip | |
- name: Extract Version Number | |
shell: bash | |
run: echo "VERSION=${GITHUB_REF##*_}" >> $GITHUB_ENV |