Skip to content

Commit

Permalink
chore(ci): update workflow
Browse files Browse the repository at this point in the history
now we have suspend icon
  • Loading branch information
amorphobia committed Sep 9, 2024
1 parent b9fbf97 commit 2449fbd
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
76 changes: 32 additions & 44 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,49 @@ on:
- 'v*'

jobs:
prepare-icon:
name: Prepare Icon
runs-on: ubuntu-latest
prepare-autohotkey-binaries:
name: Prepare AutoHotkey Binaries
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Make Icon
- name: Install Dependencies
uses: MinoruSekine/setup-scoop@v4.0.1
with:
buckets: extras
apps: resource-hacker autohotkey imagemagick-lean

- name: Prepare binaries
run: |
sudo apt-get install -y imagemagick
Push-Location assets
# https://learn.microsoft.com/windows/apps/design/style/iconography/app-icon-construction
convert -background transparent -define 'icon:auto-resize=16,24,32,48,256' icon.svg Rabbit.ico
magick.exe -background transparent -define 'icon:auto-resize=16,24,32,48,256' icon.svg rabbit.ico
magick.exe -background transparent -define 'icon:auto-resize=16,24,32,48,256' icon-alt.svg rabbit-alt.ico
Copy-Item "$(scoop prefix autohotkey)/v2/AutoHotkey32.exe" 32.exe
Copy-Item "$(scoop prefix autohotkey)/v2/AutoHotkey64.exe" 64.exe
cmd /c resourcehacker.exe -open 32.exe -save temp32.exe -action addoverwrite -resource rabbit.ico -mask ICONGROUP,159,0
cmd /c resourcehacker.exe -open temp32.exe -save AutoHotkey32.exe -action addoverwrite -resource rabbit-alt.ico -mask ICONGROUP,206,0
cmd /c resourcehacker.exe -open 64.exe -save temp64.exe -action addoverwrite -resource rabbit.ico -mask ICONGROUP,159,0
cmd /c resourcehacker.exe -open temp64.exe -save AutoHotkey64.exe -action addoverwrite -resource rabbit-alt.ico -mask ICONGROUP,206,0
Pop-Location
Move-Item "assets/AutoHotkey32.exe","assets/AutoHotkey64.exe","assets/rabbit.ico","assets/rabbit-alt.ico" .
- name: Upload Icon
uses: actions/upload-artifact@v4
with:
name: Icon
path: Rabbit.ico
path: |
rabbit.ico
rabbit-alt.ico
- name: Upload AutoHotkey
uses: actions/upload-artifact@v4
with:
name: AutoHotkey
path: |
AutoHotkey32.exe
AutoHotkey64.exe
prepare-dependency:
name: Prepare Dependency
Expand Down Expand Up @@ -113,43 +138,6 @@ jobs:
name: Data
path: Data

prepare-autohotkey-binaries:
name: Prepare AutoHotkey Binaries
runs-on: windows-latest
needs: prepare-icon
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install RcEdit
uses: MinoruSekine/setup-scoop@v4
with:
apps: rcedit

- name: Download Dependencies
uses: actions/download-artifact@v4
with:
name: Icon

- name: Fetch AutoHotkey
run: |
$AhkVer = Invoke-RestMethod "https://www.autohotkey.com/download/2.0/version.txt"
$AhkUrl = "https://www.autohotkey.com/download/2.0/AutoHotkey_$AhkVer.zip"
Invoke-WebRequest $AhkUrl -Out ahk.zip
Expand-Archive -Path ahk.zip -DestinationPath temp -Force
Move-Item -Path .\temp\AutoHotkey*.exe -Destination .\
Remove-Item -Recurse temp,ahk.zip
rcedit .\AutoHotkey32.exe --set-icon .\Rabbit.ico
rcedit .\AutoHotkey64.exe --set-icon .\Rabbit.ico
- name: Upload AutoHotkey
uses: actions/upload-artifact@v4
with:
name: AutoHotkey
path: |
AutoHotkey32.exe
AutoHotkey64.exe
build-rabbit:
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions assets/icon-alt.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 2449fbd

Please sign in to comment.