-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18e8809
commit fe1b6b1
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python v3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Install dependencies | ||
run: pip3 install Pillow heatshrink2 | ||
- name: Download XFW asset_packer.py | ||
run: wget https://raw.githubusercontent.com/Flipper-XFW/Xtreme-Firmware/dev/scripts/asset_packer.py | ||
- name: Build assets | ||
run: python3 builder.py | ||
- name: Pack for Xtreme FW | ||
run: | | ||
cd asset_packs | ||
zip -r xtreme_pirates_asset_pack.zip Pirates | ||
mv xtreme_pirates_asset_pack.zip ../build | ||
- name: Pack for Rogue Master FW | ||
run: | | ||
cd asset_packs/Pirates/Anims | ||
mv manifest.txt manifest_pirates.txt | ||
zip -r roguemaster_pirates_asset_pack.zip . | ||
mv roguemaster_pirates_asset_pack.zip ../../../build | ||
mv manifest_pirates.txt manifest.txt | ||
- name: Pack for Unleashed FW | ||
run: | | ||
cd asset_packs/Pirates/Anims | ||
sed -i 's/Max level: 30/Max level: 3/g' manifest.txt | ||
cd .. | ||
mv Anims dolphin | ||
zip -r unleashed_pirates_asset_pack.zip dolphin | ||
mv unleashed_pirates_asset_pack.zip ../../build | ||
- name: Pack for Original FW | ||
run: cp build/unleashed_pirates_asset_pack.zip build/official_pirates_asset_pack.zip | ||
- name: Commit and push | ||
run: | | ||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add build | ||
git commit -m "build asset packs" | ||
git push origin main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
raw_files | ||
.venv | ||
asset_packs | ||
asset_packs | ||
asset_packer.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/python3 | ||
from asset_packer import pack | ||
import pathlib | ||
|
||
if __name__ == "__main__": | ||
here = pathlib.Path(__file__).absolute().parent | ||
pack(here, here / "asset_packs", logger=print) |