mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-21 01:59:49 +00:00
8ee7ed23e4
* Release 0.9.9.12 * Move injection to injector executable (#554) * Fix logview missing history (#556) Closes #526 * Detect unresponsive Guild Wars instance (#557) Closes #534 Closes #422
137 lines
4.8 KiB
YAML
137 lines
4.8 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT license.
|
|
|
|
# This continuous integration pipeline is triggered anytime a user pushes code to the repo.
|
|
# This pipeline builds the Wpf project, runs unit tests, then saves the MSIX build artifact.
|
|
name: Daybreak CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "Daybreak/**"
|
|
- "Daybreak.Installer/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x64]
|
|
|
|
runs-on: windows-latest
|
|
|
|
env:
|
|
Configuration: Release
|
|
Solution_Path: Daybreak.sln
|
|
Test_Project_Path: Daybreak.Tests\Daybreak.Tests.csproj
|
|
Wpf_Project_Path: Daybreak\Daybreak.csproj
|
|
Actions_Allow_Unsecure_Commands: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get Latest Tag
|
|
id: getLatestTag
|
|
uses: WyriHaximus/github-action-get-previous-tag@v1
|
|
|
|
- name: Generate changelog
|
|
id: gen_changelog
|
|
run: |
|
|
$changeLog = git log --no-merges --pretty="%h - %s (%an)<br />" ${{ env.LatestReleaseTag }}..HEAD
|
|
echo "::set-env name=Changelog::$changeLog"
|
|
env:
|
|
LatestReleaseTag: ${{steps.getLatestTag.outputs.tag}}
|
|
|
|
- name: Install .NET Core
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.x'
|
|
|
|
- name: Setup MSBuild.exe
|
|
uses: microsoft/setup-msbuild@v1.3.2
|
|
|
|
- name: Fetch submodules
|
|
run: |
|
|
git submodule update --init --recursive
|
|
|
|
- name: Build CMake Files
|
|
run: cmake -S . -B build -A Win32
|
|
|
|
- name: Setup project secrets
|
|
run: |
|
|
dotnet user-secrets --project Daybreak\Daybreak.csproj set AadApplicationId "${{ secrets.AadApplicationId }}"
|
|
dotnet user-secrets --project Daybreak\Daybreak.csproj set AadTenantId "${{ secrets.AadTenantId }}"
|
|
|
|
- name: Restore project
|
|
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration /p:RuntimeIdentifier=$env:RuntimeIdentifier --property:SolutionDir=$GITHUB_WORKSPACE
|
|
env:
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
|
|
|
- name: Build Daybreak project
|
|
run: dotnet build Daybreak -c $env:Configuration --property:SolutionDir=$env:GITHUB_WORKSPACE
|
|
|
|
- name: Set version variable
|
|
run: |
|
|
$version = .\Scripts\GetBuildVersion.ps1
|
|
echo "::set-env name=Version::$version"
|
|
|
|
- name: Create publish launcher files
|
|
run: dotnet publish .\Daybreak\Daybreak.csproj -c $env:Configuration -r $env:RuntimeIdentifier --property:SolutionDir=$env:GITHUB_WORKSPACE -p:PublishReadyToRun=true -p:PublishSingleFile=false --self-contained true -o .\Publish
|
|
env:
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
|
|
|
- name: Create publish installer files
|
|
run: dotnet publish .\Daybreak.Installer\Daybreak.Installer.csproj -c $env:Configuration -r $env:RuntimeIdentifier --property:SolutionDir=$env:GITHUB_WORKSPACE -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true -o .\Publish
|
|
env:
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
|
|
|
- name: Create publish extractor files
|
|
run: dotnet publish .\Daybreak.7ZipExtractor\Daybreak.7ZipExtractor.csproj -c $env:Configuration -r $env:RuntimeIdentifier --property:SolutionDir=$env:GITHUB_WORKSPACE -p:PublishReadyToRun=true -p:PublishSingleFile=false --self-contained true -o .\Publish
|
|
env:
|
|
RuntimeIdentifier: win-${{ matrix.targetplatform }}
|
|
|
|
- name: Create publish injector files
|
|
run: dotnet publish .\Daybreak.Injector\Daybreak.Injector.csproj -c $env:Configuration -r $env:RuntimeIdentifier --property:SolutionDir=$env:GITHUB_WORKSPACE -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true -o .\Publish
|
|
env:
|
|
RuntimeIdentifier: win-x86
|
|
|
|
- name: Pack publish files
|
|
run: |
|
|
Write-Host $env
|
|
.\Scripts\BuildRelease.ps1 -version $env:Version
|
|
shell: pwsh
|
|
|
|
- name: Publish blob files
|
|
run: |
|
|
Write-Host $env
|
|
.\Scripts\PushFilesToBlobStorage.ps1 -version $env:Version -sourcePath .\Publish\ -connectionString "${{ secrets.BLOBSTORAGE_CONNECTIONSTRING }}"
|
|
shell: pwsh
|
|
|
|
- name: Create release draft
|
|
uses: Xotl/cool-github-releases@v1.1.8
|
|
with:
|
|
mode: update
|
|
tag_name: v${{ env.Version }}
|
|
release_name: Daybreak v${{ env.Version }}
|
|
assets: .\Publish\daybreakv${{ env.Version }}.zip
|
|
github_token: ${{ env.GITHUB_TOKEN }}
|
|
replace_assets: true
|
|
body_mrkdwn: ${{ env.Changelog }}
|
|
isDraft: true
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Publish release
|
|
run: |
|
|
gh release edit v${{ env.Version }} --draft=false
|
|
shell: powershell
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|