mirror of
https://github.com/anejolov/WinDeckHelper.git
synced 2026-06-13 04:05:06 +03:00
Create main.yml
This commit is contained in:
@@ -0,0 +1,47 @@
|
|||||||
|
name: Build SFX EXE on Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install WinRAR
|
||||||
|
run: |
|
||||||
|
choco install winrar -y
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Get Release Version
|
||||||
|
run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Create SFX archive
|
||||||
|
run: |
|
||||||
|
$SFXConfig = @"
|
||||||
|
Path=%TEMP%\Windeckhelper
|
||||||
|
Silent=1
|
||||||
|
Overwrite=1
|
||||||
|
Setup=PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& .\Windeckhelper.ps1"
|
||||||
|
TempMode=1
|
||||||
|
Title=WindeckHelper Installer
|
||||||
|
Icon=Windeckicon.ico
|
||||||
|
"@
|
||||||
|
Set-Content -Path "sfx_config.txt" -Value $SFXConfig
|
||||||
|
|
||||||
|
$exeName = "WindeckHelper_${{ env.RELEASE_VERSION }}.exe"
|
||||||
|
& "C:\Program Files\WinRAR\WinRAR.exe" a -r -sfx -z"sfx_config.txt" $exeName *
|
||||||
|
echo "EXE_NAME=$exeName" >> $GITHUB_ENV
|
||||||
|
shell: powershell
|
||||||
|
|
||||||
|
- name: Upload EXE to Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
files: ${{ env.EXE_NAME }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user