Skip to content

Update version to 1.0.5 and add configuration for Git HTTP version to… #7

Update version to 1.0.5 and add configuration for Git HTTP version to…

Update version to 1.0.5 and add configuration for Git HTTP version to… #7

name: Build and Release
on:
push:
branches: [ main ]
workflow_dispatch: # Allow manual triggering
jobs:
build-and-release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for version bumping
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Get version from VERSION file
id: get_version
run: |
$version = Get-Content VERSION -Raw
$version = $version.Trim()
Write-Host "Building release for version: $version"
echo "version=$version" >> $env:GITHUB_OUTPUT
- name: Create logs directory
run: |
if (-not (Test-Path "logs")) {
New-Item -ItemType Directory -Path "logs"
}
- name: Download dependencies
run: |
go mod tidy
- name: Create dist directory
run: |
if (-not (Test-Path "dist")) {
New-Item -ItemType Directory -Path "dist"
}
- name: Build executable
run: |
Write-Host "Building UE-Git-Plugin-Manager.exe..."
go build -o dist/UE-Git-Plugin-Manager.exe .
if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed!"
exit 1
}
Write-Host "Build successful!"
- name: Verify executable
run: |
if (Test-Path "dist/UE-Git-Plugin-Manager.exe") {
$fileSize = (Get-Item "dist/UE-Git-Plugin-Manager.exe").Length
Write-Host "Executable created successfully. Size: $fileSize bytes"
} else {
Write-Error "Executable not found!"
exit 1
}
- name: Log version info
run: |
Write-Host "Building release for version: ${{ steps.get_version.outputs.version }}"
Write-Host "Version is controlled by the VERSION file in the repository"
- name: Create Release
run: |
gh release create "v${{ steps.get_version.outputs.version }}" `
--title "Release v${{ steps.get_version.outputs.version }}" `
--notes "## Changes in v${{ steps.get_version.outputs.version }}
This release includes the latest changes from the main branch.
### Download
Download the \`UE-Git-Plugin-Manager.exe\` file below and run it to use the latest version.
### Installation
1. Download \`UE-Git-Plugin-Manager.exe\`
2. Run the executable
3. Follow the setup wizard" `
./dist/UE-Git-Plugin-Manager.exe
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}