Skip to content

Commit

Permalink
Change packaging so we don't double zip
Browse files Browse the repository at this point in the history
  • Loading branch information
N7Alpha committed Oct 22, 2023
1 parent ab2fd37 commit 5afe5ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,63 +48,63 @@ jobs:
uses: actions/[email protected]
with:
name: UnrealLibretro-4.24
path: UnrealLibretro-4.24.zip
path: UnrealLibretro-4.24
if-no-files-found: error

- name: Upload Build-Artifact 4.25
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-4.25
path: UnrealLibretro-4.25.zip
path: UnrealLibretro-4.25
if-no-files-found: error

- name: Upload Build-Artifact 4.26
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-4.26
path: UnrealLibretro-4.26.zip
path: UnrealLibretro-4.26
if-no-files-found: error

- name: Upload Build-Artifact 4.27
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-4.27
path: UnrealLibretro-4.27.zip
path: UnrealLibretro-4.27
if-no-files-found: error

- name: Upload Build-Artifact 5.0
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-5.0
path: UnrealLibretro-5.0.zip
path: UnrealLibretro-5.0
if-no-files-found: error

- name: Upload Build-Artifact 5.1
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-5.1
path: UnrealLibretro-5.1.zip
path: UnrealLibretro-5.1
if-no-files-found: error

- name: Upload Build-Artifact 5.2
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-5.2
path: UnrealLibretro-5.2.zip
path: UnrealLibretro-5.2
if-no-files-found: error

- name: Upload Build-Artifact 5.3
if: startsWith(github.ref, 'refs/heads/')
uses: actions/[email protected]
with:
name: UnrealLibretro-5.3
path: UnrealLibretro-5.3.zip
path: UnrealLibretro-5.3
if-no-files-found: error

- name: Release
Expand Down
9 changes: 4 additions & 5 deletions package.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def git_get_tag_or_short_hash(revision="HEAD"):
status = os.system(
f'"{ue_path}/Engine/Build/BatchFiles/RunUAT" BuildPlugin -Rocket'
f' -Plugin={plugin_path}/UnrealLibretro.uplugin -TargetPlatforms=Win64'
f' -Package={plugin_path}/UnrealLibretro -VS2019'
f' -Package={plugin_path}/UnrealLibretro-{major}.{minor}/UnrealLibretro -VS2019'
)

if status:
Expand All @@ -77,8 +77,7 @@ def unix_touch(path):
Path(os.path.dirname(path)).mkdir()
Path(path).touch()

unix_touch(f'UnrealLibretro/MyROMs/Place Your ROMs in this Directory')
unix_touch(f'UnrealLibretro/MyCores/Place Your Libretro Cores in this Directory')
unix_touch(f'{plugin_path}/UnrealLibretro-{major}.{minor}/UnrealLibretro/MyROMs/Place Your ROMs in this Directory')
unix_touch(f'{plugin_path}/UnrealLibretro-{major}.{minor}/UnrealLibretro/MyCores/Place Your Libretro Cores in this Directory')

os.system(f'tar -acf UnrealLibretro-{major}.{minor}.zip -C {plugin_path} UnrealLibretro')
shutil.rmtree(f'UnrealLibretro')
os.system(f'tar -acf UnrealLibretro-{major}.{minor}.zip -C {plugin_path}/UnrealLibretro-{major}.{minor} UnrealLibretro')

0 comments on commit 5afe5ec

Please sign in to comment.