Skip to content

Updated getbuffs

Updated getbuffs #185

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
tags:
- "v*.*.*"
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-2022
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
toolset: 14.30
sdk: 10.0.22000.0
- name: Generate version information
run: powershell "${env:GITHUB_WORKSPACE}\Version.ps1" -ref "${{github.ref}}" -sha "${{github.sha}}"
- uses: nuget/setup-nuget@v1
with:
nuget-version: '5.x'
- run: nuget restore "${env:GITHUB_WORKSPACE}\GW2Clarity.sln"
- name: 'Setup NuGet Credentials'
shell: 'bash'
run: >
`vcpkg fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/Friendly0Fire/index.json"
-storepasswordincleartext
-name "GitHub"
-username "Friendly0Fire"
-password "${{ secrets.GITHUB_TOKEN }}"
- name: Build Release
if: startsWith(github.ref, 'refs/tags/v')
run: msbuild.exe "${env:GITHUB_WORKSPACE}\GW2Clarity.sln" /t:Build /p:Configuration=Release /p:Platform=x64 /p:GitHubDefs=USE_GITHUB_VER
- name: Build Debug
run: msbuild.exe "${env:GITHUB_WORKSPACE}\GW2Clarity.sln" /t:Build /p:Configuration=Debug /p:Platform=x64 /p:GitHubDefs=USE_GITHUB_VER
- name: Save nightly build from master
uses: actions/upload-artifact@v3
if: startsWith(github.ref, 'refs/tags/v') == false
with:
name: nightly-${{ github.sha }}
path: |
x64/Debug/gw2addon_gw2clarity.dll
x64/Debug/gw2addon_gw2clarity.pdb
x64/Debug/getbuffs.dll
x64/Debug/readme.md
- name: Move files for tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
mkdir -p x64/Release/gw2clarity
mkdir -p x64/Debug/gw2clarity
mv x64/Release/gw2addon_gw2clarity.dll x64/Release/gw2clarity/
mv x64/Release/getbuffs.dll x64/Release/gw2clarity/
mv x64/Release/readme.md x64/Release/gw2clarity/
mv x64/Debug/gw2addon_gw2clarity.dll x64/Debug/gw2clarity/
mv x64/Debug/gw2addon_gw2clarity.pdb x64/Debug/gw2clarity/
mv x64/Debug/getbuffs.dll x64/Debug/gw2clarity/
- name: Zip files for tag
if: startsWith(github.ref, 'refs/tags/v')
run: |
cd x64/Release
7z a ../../gw2clarity.zip gw2clarity/
7z a ../../gw2clarity_pdb.zip gw2addon_gw2clarity.pdb
cd ../..
cd x64/Debug
7z a ../../gw2clarity_debug.zip gw2clarity/
cd ../..
- name: Create release draft for tag
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: ${{ contains(github.ref, '-pre') }}
files: |
gw2clarity.zip
gw2clarity_pdb.zip
gw2clarity_debug.zip