Skip to content

Update project metadata and version to 1.0.3 #7

Update project metadata and version to 1.0.3

Update project metadata and version to 1.0.3 #7

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*' # Trigger on version tags
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for changelog generation
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Echo Directory Structure Before Build
shell: pwsh
run: |
Write-Host "Current Directory Structure:"
Get-ChildItem -Recurse | Select-Object FullName
- name: Restore NuGet packages
run: nuget restore WelcomeScreenCustomizer.sln
- name: Build Solution
run: |
msbuild WelcomeScreenCustomizer.sln `
/p:Configuration=Release `
/p:Platform="Any CPU" `
/p:OutputPath="bin\Release" `
/p:DeployOnBuild=true `
/p:OutDir="$env:GITHUB_WORKSPACE\artifacts" `
/verbosity:detailed
- name: Echo Build Output Directory
shell: pwsh
run: |
Write-Host "Build Output Directory Structure:"
Get-ChildItem -Path "$env:GITHUB_WORKSPACE\artifacts" -Recurse | Select-Object FullName
Write-Host "Bin Directory Structure:"
Get-ChildItem -Path "bin" -Recurse | Select-Object FullName
- name: Create Release Package
shell: pwsh
run: |
# Create release directory
New-Item -ItemType Directory -Force -Path ".\ReleasePackage"
# Find and copy the executable
$exePath = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Filter "WelcomeScreenCustomizer.exe" -Recurse | Select-Object -First 1 -ExpandProperty FullName
Write-Host "Found executable at: $exePath"
Copy-Item $exePath -Destination ".\ReleasePackage\"
# Copy icon and any other necessary files
Copy-Item ".\app.ico" -Destination ".\ReleasePackage\"
Copy-Item ".\README.md" -Destination ".\ReleasePackage\"
# Create ZIP file
Compress-Archive -Path ".\ReleasePackage\*" -DestinationPath "WelcomeScreenCustomizer.zip" -Force
# Verify ZIP contents
Write-Host "ZIP file contents:"
Compress-Archive -Path ".\ReleasePackage\*" -DestinationPath "WelcomeScreenCustomizer.zip" -Force -WhatIf
- name: Generate Release Notes
id: release_notes
shell: pwsh
run: |
# Get the current tag
$currentTag = "${{ github.ref_name }}"
# Get the previous tag
$previousTag = $(git describe --tags --abbrev=0 "${{ github.ref_name }}^" 2>$null)
# Generate changelog
$changelog = if ($previousTag) {
git log --pretty=format:"- %s" "$previousTag..$currentTag"
} else {
git log --pretty=format:"- %s" "$currentTag"
}
# Create release notes content
$releaseNotes = @"
# Windows 11 Welcome Screen Customizer $currentTag
## Changes in this version:
$changelog
## Package Contents
- WelcomeScreenCustomizer.exe (Main application)
- app.ico (Application icon)
- README.md (Documentation)
## Important Notes
- This application requires administrative privileges
- Preventing OS override is required for the changes to persist
- Compatible with Windows 11 only
## Installation
1. Download and extract WelcomeScreenCustomizer.zip
2. Run WelcomeScreenCustomizer.exe as administrator
3. Follow the in-app instructions
"@
# Save release notes to file
$releaseNotes | Out-File -FilePath release_notes.md -Encoding UTF8
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: WelcomeScreenCustomizer.zip
draft: false
prerelease: false
generate_release_notes: true
body_path: release_notes.md