Skip to content

Commit

Permalink
Merge branch 'easy-release-windows' into release-editor-mac-lin-win
Browse files Browse the repository at this point in the history
  • Loading branch information
humbertodias committed Feb 11, 2024
2 parents 6c68146 + e2082d0 commit de3fdbc
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .github/workflows/mingw-cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,29 @@ jobs:

- name: Run build
run: |
docker build -f docker/WindowsDockerfile .
./easy-compile-docker-windows
./easy-release-windows
- name: Archive Folder
uses: actions/upload-artifact@v2
with:
name: artifact
path: ${{github.workspace}}/*.zip

publish-release:
needs: build
runs-on: ubuntu-latest

steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: artifact
path: ${{github.workspace}}

- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ github.workspace }}/*.zip
33 changes: 33 additions & 0 deletions easy-release-windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

EXEDIR=`pwd`
EXE=paintown.exe

# inside tmp
cd `mktemp -d`

# copy executable
cp $EXEDIR/mingw-bin/$EXE .
# copy dependencies
docker run --rm -iv `pwd`:/paintown-bin -w /paintown-bin paintown-mingw-build bash -c "cp /usr/x86_64-w64-mingw32/lib/zlib1.dll ."

# launcher
echo '
if (-not (Test-Path -Path data)) {
Invoke-WebRequest -Uri "https://github.com/kazzmir/paintown/releases/download/v3.6.0/data-3.6.0.zip" -OutFile "data.zip"
Expand-Archive -Path "data.zip" -DestinationPath .
Remove-Item -Path data.zip
Rename-Item -Path data-3.6.0 -NewName data
}
Start-Process -FilePath paintown.exe
' > paintown.ps1
echo '
powershell.exe -ExecutionPolicy Bypass -File paintown.ps1
' > run.bat

file $EXE

# packaging
ARCH=`file paintown.exe | grep -o -E 'x86[_-]64|i[[:digit:]]86|ARM'`
OS=windows
zip -r $EXEDIR/$EXE-$OS-$ARCH.zip .

0 comments on commit de3fdbc

Please sign in to comment.