mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-15 15:19:57 +00:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Daybreak Version Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- "Daybreak.Core/**"
|
|
- "Daybreak.Installer/**"
|
|
- "Daybreak.API/**"
|
|
- "Daybreak.Shared/**"
|
|
- "Daybreak.Windows/**"
|
|
- "Daybreak.Linux/**"
|
|
|
|
jobs:
|
|
check_version:
|
|
strategy:
|
|
matrix:
|
|
targetplatform: [x64]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
Configuration: Release
|
|
Solution_Path: Daybreak.slnx
|
|
Actions_Allow_Unsecure_Commands: true
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install .NET Core
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: "10.x"
|
|
|
|
- name: Get Latest Tag
|
|
id: getLatestTag
|
|
uses: WyriHaximus/github-action-get-previous-tag@v2
|
|
|
|
- name: Build Daybreak project
|
|
run: dotnet build Daybreak.Linux -c $Configuration --property:SolutionDir=$GITHUB_WORKSPACE
|
|
|
|
- name: Get version
|
|
id: get_version
|
|
run: |
|
|
version=$(grep '<Version>' Directory.Build.props | sed 's/.*<Version>\(.*\)<\/Version>.*/\1/')
|
|
echo "version=$version" >> $GITHUB_OUTPUT
|
|
|
|
- name: Check version difference
|
|
run: pwsh ./Scripts/CompareVersions.ps1 -currentVersion ${{ steps.get_version.outputs.version }} -lastVersion ${{ steps.getLatestTag.outputs.tag }}
|
|
shell: pwsh
|
|
|