mirror of
https://github.com/barkeser2002/ripcord-fix.git
synced 2026-09-25 01:09:53 +03:00
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-release:
|
|
name: Build and Create Release
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Visual Studio Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
with:
|
|
arch: x64
|
|
|
|
- name: Build with build.bat
|
|
run: build.bat
|
|
shell: cmd
|
|
|
|
- name: Verify build output
|
|
run: |
|
|
if exist build\UxTheme.dll (
|
|
echo Build successful: build\UxTheme.dll exists
|
|
dir build\UxTheme.dll
|
|
) else (
|
|
echo ERROR: build\UxTheme.dll not found
|
|
exit 1
|
|
)
|
|
shell: cmd
|
|
|
|
- name: Get tag name
|
|
id: tag
|
|
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
shell: bash
|
|
|
|
- name: Generate release notes
|
|
id: release_notes
|
|
run: |
|
|
$tag = "${{ env.TAG_NAME }}"
|
|
$prevTag = git tag --sort=-v:refname | Select-Object -Skip 1 | Select-Object -First 1
|
|
if (-not $prevTag) {
|
|
$prevTag = "HEAD~10"
|
|
}
|
|
$notes = git log "$prevTag..$tag" --pretty=format:"- %s" --no-merges
|
|
if (-not $notes) {
|
|
$notes = "Release $tag"
|
|
}
|
|
$notes | Out-File -FilePath release_notes.txt -Encoding utf8
|
|
echo "Generated release notes:"
|
|
Get-Content release_notes.txt
|
|
shell: powershell
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ env.TAG_NAME }}
|
|
name: Release ${{ env.TAG_NAME }}
|
|
body_path: release_notes.txt
|
|
files: build/UxTheme.dll
|
|
draft: false
|
|
prerelease: false
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|