English | 简体中文
🎨 A GitHub Action to automatically replace Windows application icons. This action downloads and uses Resource Hacker™ automatically.
- 🚀 Automated: No manual installation of Resource Hacker required - the action downloads it automatically
- 🎯 Simple: Just provide an exe file and an ico icon
- 🔧 Flexible: Support for custom resource names, types, and languages
- 📦 Lightweight: No third-party executables included in the repository
- ✅ Reliable: Complete error checking and logging
- Windows runner environment (use
runs-on: windows-latest) - Valid
.icoicon file - Target Windows executable file (
.exe)
name: Replace App Icon
on:
push:
branches: [ main ]
jobs:
replace-icon:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Replace icon
uses: overflow65537/resource_hacker@v1
with:
exe-path: 'path/to/your/app.exe'
icon-path: 'path/to/your/icon.ico'- name: Replace icon with custom settings
uses: overflow65537/resource_hacker@v1
with:
exe-path: 'MyApp.exe'
icon-path: 'icons/custom.ico'
output-path: 'MyApp_Modified.exe' # Optional: output to new file
resource-name: 'MAINICON' # Optional: resource name
resource-type: 'ICONGROUP' # Optional: resource type
resource-language: '0' # Optional: language ID (0=neutral)name: Build and Customize App
on:
release:
types: [created]
jobs:
customize-app:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build application
run: |
# Your build steps
dotnet build -c Release
- name: Replace application icon
uses: overflow65537/resource_hacker@v1
with:
exe-path: 'bin/Release/MyApp.exe'
icon-path: 'assets/icon.ico'
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: customized-app
path: 'bin/Release/MyApp.exe'| Parameter | Required | Default | Description |
|---|---|---|---|
exe-path |
✅ | - | Path to the executable file to modify |
icon-path |
✅ | - | Path to the new icon file (.ico) |
output-path |
❌ | (same as input) | Output file path, leave empty to overwrite original |
resource-name |
❌ | MAINICON |
Resource name |
resource-type |
❌ | ICONGROUP |
Resource type |
resource-language |
❌ | 0 |
Language ID (0=language neutral) |
| Output | Description |
|---|---|
output-file |
Path to the modified executable file |
- name: Replace icon
id: icon-replace
uses: overflow65537/resource_hacker@v1
with:
exe-path: 'app.exe'
icon-path: 'icon.ico'
- name: Display output path
run: echo "Modified file: ${{ steps.icon-replace.outputs.output-file }}"- 🔄 CI/CD Automation: Automatically replace application icons in build pipelines
- 🎨 Brand Customization: Generate applications with customized icons for different clients
- 📦 Batch Processing: Process icons for multiple applications at once
- 🌍 Localization: Set different icons for different regional versions
This project is licensed under the MIT License - see the LICENSE file for details.
This action uses Resource Hacker™, which is:
- ✅ Freeware
- ✅ Available for personal and commercial use
- ✅ Supports command-line automation
⚠️ Cannot be redistributed (this action downloads it from the official website via script)⚠️ Must only be used for legal software modification
Important Notes:
- This action does not include Resource Hacker executables
- Resource Hacker is downloaded from the official website at runtime
- Resource Hacker™ © 1999-2025 Angus Johnson
When using this action, please ensure:
- ✅ You have the right to modify the target application
- ✅ The target application's license allows resource modification
- ✅ You use it for legal purposes only
The author of this action is not responsible for any misuse.
# Ensure the file path is correct, use relative or absolute paths
exe-path: './build/app.exe' # ✅ Relative path
exe-path: 'D:/project/app.exe' # ✅ Absolute path# Ensure you use .ico format icon files
icon-path: 'icon.ico' # ✅ Correct
icon-path: 'icon.png' # ❌ Wrong, needs conversion to .icoIf the official website is unavailable, the action will fail. This is expected behavior as we do not redistribute Resource Hacker.
Issues and Pull Requests are welcome!
For questions or suggestions, please contact via GitHub Issues.
- Angus Johnson - Author of Resource Hacker™
Note: Resource Hacker™ is a trademark of Angus Johnson. This project is not officially affiliated with the author of Resource Hacker.