1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00
Pixelorama/.github/workflows/release.yml

292 lines
12 KiB
YAML
Raw Normal View History

2020-09-12 00:27:08 +00:00
name: "release"
on:
push:
branches: [ release ]
env:
GODOT_VERSION: 3.3
GODOT_VERSION_MAC: 3.3
2020-09-12 00:27:08 +00:00
EXPORT_NAME: Pixelorama
TAG: v0.9
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
2020-09-12 00:27:08 +00:00
jobs:
export-windows:
name: Windows Export 🗔
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.3
2020-09-12 00:27:08 +00:00
steps:
- name: Setup WINE, rcedit and NSIS 🍷
2020-09-12 00:27:08 +00:00
run: |
dpkg --add-architecture i386 && apt-get update && apt-get install -y wine-stable && apt-get install -y wine32 && apt-get install -y nsis
2020-09-12 00:27:08 +00:00
chown root:root -R ~
wget https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe
mkdir -v -p ~/.local/share/rcedit
mv rcedit-x64.exe ~/.local/share/rcedit
godot -q
echo 'export/windows/wine = "/usr/bin/wine"' >> ~/.config/godot/editor_settings-3.tres
echo 'export/windows/rcedit = "/github/home/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-3.tres
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/windows-64bit build/windows-32bit ~/.local/share/godot/templates
2020-09-12 00:27:08 +00:00
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build 🔧
run: |
godot -v --export "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe
godot -v --export "Windows Desktop 32-bit" ./build/windows-32bit/$EXPORT_NAME.exe
2020-09-12 00:27:08 +00:00
- name: Copy pixelorama_data folder 📁
run: |
cp -R ./pixelorama_data ./build
rm ./build/pixelorama_data/.gdignore
2020-09-12 00:27:08 +00:00
- name: Zip 🗜️
working-directory: ./build
2020-09-12 00:27:08 +00:00
run: |
zip windows-64bit.zip -rj windows-64bit && zip -r windows-64bit.zip pixelorama_data
zip windows-32bit.zip -rj windows-32bit && zip -r windows-32bit.zip pixelorama_data
- name: Build installer 🔧
run: |
python3 ./installer/utils/po2nsi.py -i ./installer/pixelorama.nsi -o ./installer/pixelorama_loc.nsi -p ./installer/po -l "English" -v
makensis ./installer/pixelorama_loc.nsi
mkdir ./build/installer
mv ./installer/${EXPORT_NAME}_${TAG}_setup.exe ./build/installer
- name: Upload 64-bit Release Asset 🚀
2020-09-12 00:27:08 +00:00
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/windows-64bit.zip
asset_name: ${{env.EXPORT_NAME}}[Windows-64bit].zip
tag: ${{env.TAG}}
overwrite: true
- name: Upload 32-bit Release Asset 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/windows-32bit.zip
asset_name: ${{env.EXPORT_NAME}}[Windows-32bit].zip
tag: ${{env.TAG}}
overwrite: true
- name: Upload installer Release Asset 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/installer/${{env.EXPORT_NAME}}_${{env.TAG}}_setup.exe
tag: ${{env.TAG}}
overwrite: true
- name: Upload Release Assets to itch.io 🎮
run: |
butler push ./build/windows-64bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-64 --userversion ${{env.TAG}}
butler push ./build/windows-32bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-32 --userversion ${{env.TAG}}
2021-07-10 15:14:57 +00:00
butler push ./build/installer ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-installer --userversion ${{env.TAG}}
2020-09-12 00:27:08 +00:00
export-linux:
name: Linux Export 🐧
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.3
2020-09-12 00:27:08 +00:00
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/linux-64bit build/linux-32bit ~/.local/share/godot/templates
2020-09-12 00:27:08 +00:00
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Linux Build 🔧
run: |
godot -v --export "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64
godot -v --export "Linux/X11 32-bit" ./build/linux-32bit/$EXPORT_NAME.x86
2020-09-12 00:27:08 +00:00
- name: Give execute permission ☑️
run: |
2020-09-12 00:27:08 +00:00
chmod +x ./build/linux-64bit/$EXPORT_NAME.x86_64
chmod +x ./build/linux-32bit/$EXPORT_NAME.x86
2020-09-12 00:27:08 +00:00
- name: Copy pixelorama_data folder 📁
run: |
cp -R ./pixelorama_data ./build/linux-64bit
rm ./build/linux-64bit/pixelorama_data/.gdignore
cp -R ./pixelorama_data ./build/linux-32bit
rm ./build/linux-32bit/pixelorama_data/.gdignore
2020-09-12 00:27:08 +00:00
- name: Create tar.gz archive 🗜️
run: |
cd build
tar zcvf linux-64bit.tar.gz linux-64bit
tar zcvf linux-32bit.tar.gz linux-32bit
- name: Upload 64-bit Release Asset 🚀
2020-09-12 00:27:08 +00:00
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/linux-64bit.tar.gz
asset_name: ${{env.EXPORT_NAME}}[Linux-64bit].tar.gz
tag: ${{env.TAG}}
overwrite: true
- name: Upload 32-bit Release Asset 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/linux-32bit.tar.gz
asset_name: ${{env.EXPORT_NAME}}[Linux-32bit].tar.gz
tag: ${{env.TAG}}
overwrite: true
- name: Upload Release Assets to itch.io 🎮
run: |
butler push ./build/linux-64bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-64 --userversion ${{env.TAG}}
butler push ./build/linux-32bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-32 --userversion ${{env.TAG}}
2020-09-12 00:27:08 +00:00
(Port) Port Pixelorama to Ubuntu Touch (#517) * Add support for creating Ubuntu Touch click packages. The clickable directory contains the files necessary to create a click package designed for Ubuntu Touch, a community-driven Linux distro for mobile phones as an alternative to iOS and Android. A new CI script has been added to create the packages, which is copied over from one of my other projects. Please change this to suit your needs. A new custom feature "clickable" has been added to the project settings to allow customizations for the Ubuntu Touch platform. Signed-off-by: Marquis Kurt <software@marquiskurt.net> * Make clickable CI follow more closely to desktop builds * Remove sudo from clickable install step * Install software-properties-common * Comment out docker startups in click install * Change export name for Click version * Change name and export mode to pack only * Change means of copying data to clickable dir * Install sudo to docker * Add -g to docker add user * Remove docker user creation * Remove other chpasswd stuff * Split CI into two jobs * Make build-ubports.sh runnable * Use HiPDI GUI theme on Clickable * Move clickable folder to Misc, add release CI targets * Add mobile to clickable settings * Add pixelorama_data to install data * Create pixelorama_data subdir in click itself * Change default save dir for clickable * Update AppArmor policy * Update clickable version to test AppArmor * Revert changes and use user data dir * Add README pertaining to Ubuntu Touch * Remove GODOT_MAC_VERSION from UT port workflow Co-authored-by: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com>
2021-09-25 10:42:31 +00:00
build_pck:
name: Create Pixelorama pack data for Clickable
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.3
steps:
- name: Clone source
uses: actions/checkout@v2
with:
submodules: true
- name: Linux Build 🔧
run: godot -v --export-pack "Clickable (Package Only)" ./Misc/Clickable/Pixelorama.pck
- name: Copy Pixelorama data files
run: |
cp -R ./pixelorama_data ./Misc/Clickable
- name: Upload data files for click package
uses: actions/upload-artifact@v2
with:
name: pixelorama_click_data
path: Misc/Clickable/
retention-days: 14
export-clickable:
name: Create click package
needs: build_pck
runs-on: ubuntu-latest
strategy:
matrix:
architectures:
- armhf
- arm64
steps:
- name: Clone source
uses: actions/checkout@v2
- name: Install clickable dependencies
run: |
sudo add-apt-repository ppa:bhdouglass/clickable
sudo apt update
sudo apt install -y containerd docker.io runc clickable
sudo systemctl unmask docker.service
sudo systemctl start docker.service
- name: Remove existing click folder
run: rm -r ./Misc/Clickable
- name: Download click data
uses: actions/download-artifact@v2
with:
name: pixelorama_click_data
path: ./Misc/Clickable
- name: Run Clickable
run: |
cd Misc/Clickable
chmod +x build-ubports.sh
clickable build
env:
CLICKABLE_ARCH: ${{ matrix.architectures }}
- name: Upload Clickable Release Asset 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Misc/Clickable/build/**.click
asset_name: ${{env.EXPORT_NAME}}[CLickable]${{ matrix.architectures }}.tar.gz
tag: ${{ env.TAG }}
overwrite: true
- name: Upload Release Assets to itch.io 🎮
run: |
butler push Misc/Clickable/build/**.click ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:ubuntu-touch-${{ matrix.architectures }} --userversion ${{env.TAG}}
2020-09-12 00:27:08 +00:00
export-mac:
name: Mac Export 🍎
runs-on: macos-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup environment 🔧
run: |
export GODOT_VERSION=3.3
2020-09-12 00:27:08 +00:00
export EXPORT_NAME=Pixelorama
- name: Download and extract export templates 💾
run: |
mkdir -v -p ~/.local/share/godot/templates/${GODOT_VERSION_MAC}.stable
curl -O https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION_MAC}/Godot_v${GODOT_VERSION_MAC}-stable_export_templates.tpz
unzip -a Godot_v${GODOT_VERSION_MAC}-stable_export_templates.tpz
mv ./templates/* ~/.local/share/godot/templates/${GODOT_VERSION_MAC}.stable
2020-09-12 00:27:08 +00:00
- name: Download Godot headless binary 🤖
run: |
wget https://github.com/huskeee/godot-headless-mac/releases/download/3.3-stable/Godot_v3.3-stable_mac_headless.64.zip
unzip -a Godot_v${GODOT_VERSION_MAC}-stable_mac_headless.64.zip
2020-09-12 00:27:08 +00:00
- name: Setup 💻
run: mkdir -v -p ./build/mac
- name: Mac Build 🔧
run: |
chown runner ./Godot
chmod +x ./Godot
./Godot -v --export "Mac OSX" ./build/mac/Pixelorama.zip
- name: Make application executable 🔧
run: |
unzip -a ./build/mac/Pixelorama.zip -d ./build/mac
chmod +x ./build/mac/Pixelorama.app/Contents/MacOS/Pixelorama
rm ./build/mac/Pixelorama.zip
- name: Fix application icon 🖼
run: sips -s format icns ./build/mac/Pixelorama.app/Contents/Resources/icon.icns --out ./build/mac/Pixelorama.app/Contents/Resources/icon.icns
- name: Copy pixelorama_data folder 📁
run: |
cp -R ./pixelorama_data ./build/mac/Pixelorama.app/Contents/MacOS
rm ./build/mac/Pixelorama.app/Contents/MacOS/pixelorama_data/.gdignore
- name: Create DMG archive 🔧
run: hdiutil create -srcfolder ./build/mac -volname Pixelorama ./build/mac/Pixelorama.dmg
2020-09-12 00:27:08 +00:00
- name: Upload Release Asset 🚀
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/mac/Pixelorama.dmg
asset_name: ${{env.EXPORT_NAME}}[Mac].dmg
tag: ${{env.TAG}}
overwrite: true
- name: Upload Release Assets to itch.io 🎮
run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default
unzip butler.zip
chmod +x butler
./butler push ./build/mac/Pixelorama.dmg ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:mac --userversion ${{env.TAG}}
2020-09-12 00:27:08 +00:00
export-web:
name: Web Export 🌐
runs-on: ubuntu-latest
container:
image: docker://barichello/godot-ci:3.3
2020-09-12 00:27:08 +00:00
steps:
- name: Checkout 🛎️
uses: actions/checkout@v1
with:
submodules: true
- name: Setup 💻
run: |
mkdir -v -p build/web ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Web Build 🔧
run: godot -v --export "HTML5" ./build/web/index.html
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build/web # The folder the action should deploy.
- name: Upload Release Assets to itch.io 🎮
run: |
butler push ./build/web ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:web --userversion ${{env.TAG}}