mirror of
https://github.com/gabrielkheisa/auto_dark_light_windows.git
synced 2025-08-21 11:31:06 +00:00
first
This commit is contained in:
46
.github/workflows/build.yml
vendored
Normal file
46
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Build & Release ThemeChanger
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Build and Upload Release ZIP
|
||||
runs-on: windows-latest
|
||||
|
||||
permissions:
|
||||
contents: write # Needed for creating/updating releases
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
- name: Tidy dependencies
|
||||
run: go mod tidy
|
||||
|
||||
- name: Build executable
|
||||
run: go build -ldflags="-H windowsgui" -o themechanger.exe
|
||||
|
||||
- name: Create ZIP with icon and binary
|
||||
run: Compress-Archive -Path themechanger.exe,icon.ico -DestinationPath themechanger.zip
|
||||
|
||||
- name: Create or update release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: latest
|
||||
name: Latest Build
|
||||
files: themechanger.zip
|
||||
body: |
|
||||
✅ Automatic build from latest commit to `main`
|
||||
🛠️ Includes `themechanger.exe` and `icon.ico`
|
||||
🔄 Ready to drop into `shell:startup`
|
||||
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Reference in New Issue
Block a user