Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@ on:
jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
cache: true
cache-dependency-path: packages.lock.json
cache-dependency-path: "**/packages.lock.json"

- name: Restore
run: dotnet restore

- name: Build Debug
run: ./build.bat debug
run: ./build.bat debug nopause

- name: Build Optimized Debug
run: ./build.bat optimized
run: ./build.bat optimized nopause
78 changes: 60 additions & 18 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,84 @@ permissions:
jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0, submodules: recursive }
with:
fetch-depth: 0
submodules: recursive

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
cache: true
cache-dependency-path: packages.lock.json
cache-dependency-path: "**/packages.lock.json"

# Получаем информацию о версии
- name: Get Git Version Info
id: version
shell: pwsh
run: |
$commitCount = git rev-list --count HEAD
$shortHash = git rev-parse --short=7 HEAD
$version = "1.0.$commitCount"
$fullVersion = "1.0.$commitCount+$shortHash"

echo "VERSION=$version" >> $env:GITHUB_ENV
echo "FULL_VERSION=$fullVersion" >> $env:GITHUB_ENV
echo "COMMIT_HASH=$shortHash" >> $env:GITHUB_ENV
echo "COMMIT_COUNT=$commitCount" >> $env:GITHUB_ENV

- name: Build Debug
run: ./build.bat debug
- name: Build Debug Full
run: ./build.bat debug nopause

- name: Build Optimized Debug
run: ./build.bat optimized
- name: Build Release Full + Package
run: ./build.bat publish nopause

- name: Publish Release
run: ./build.bat publish
# Архивация Debug сборки
- name: Archive Debug Build
run: |
cd bin/Debug/net10.0
7z a -t7z -mx=9 "../../LMP-Debug-v${{ env.FULL_VERSION }}.7z" .
cd ../../..

- name: Upload Artifacts
- name: Rename Release Archive
run: Move-Item -Path "LMP-v${{ env.FULL_VERSION }}.7z" -Destination "LMP-Release-v${{ env.FULL_VERSION }}.7z" -Force

# Загрузка артефактов
- name: Upload Debug Artifact
uses: actions/upload-artifact@v4
with:
name: LMP-Debug
path: bin/Debug/net10.0/
name: LMP-Debug-v${{ env.FULL_VERSION }}
path: LMP-Debug-v${{ env.FULL_VERSION }}.7z

- name: Upload Optimized
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: LMP-Optimized-Debug
path: bin/Debug/net10.0/
name: LMP-Release-v${{ env.FULL_VERSION }}
path: LMP-Release-v${{ env.FULL_VERSION }}.7z

# Создание Pre-release с предупреждением
- name: Create Pre-release
uses: softprops/action-gh-release@v2
if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
tag_name: v1.0.${{ github.run_number }}
name: "Dev Build #${{ github.run_number }}"
tag_name: v${{ env.VERSION }}-dev.${{ github.run_number }}
name: "Dev Build #${{ github.run_number }} (v${{ env.FULL_VERSION }})"
prerelease: true
files: LMP-*.7z
files: |
LMP-Debug-v${{ env.FULL_VERSION }}.7z
LMP-Release-v${{ env.FULL_VERSION }}.7z
body: |
**Автоматическая dev-сборка #${{ github.run_number }}**

- **Версия**: `v${{ env.FULL_VERSION }}`
- **Коммит**: `${{ env.COMMIT_HASH }}`
- **Всего коммитов**: ${{ env.COMMIT_COUNT }}

⚠️ **Это нестабильная автоматическая сборка!**

Предназначена только для тестирования, показа друзьям и поиска багов.

Не используйте как основную версию.
Если найдёте проблемы — создавайте Issue.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ on:
jobs:
publish:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
with:
fetch-depth: 0

- uses: actions/setup-dotnet@v4
with: { dotnet-version: '10.0.x', cache: true, cache-dependency-path: packages.lock.json }
with:
dotnet-version: '10.0.x'
cache: true
cache-dependency-path: "**/packages.lock.json"

- run: ./build.bat publish
- name: Publish Release
run: ./build.bat publish nopause

- name: Upload Release Asset
uses: softprops/action-gh-release@v2
Expand Down
Loading
Loading