Skip to content

Commit

Permalink
ci: refactored continuous builds output files generating
Browse files Browse the repository at this point in the history
  • Loading branch information
SNMetamorph committed Oct 30, 2023
1 parent b2202de commit 3a43334
Showing 1 changed file with 34 additions and 28 deletions.
62 changes: 34 additions & 28 deletions .github/workflows/nightly-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,20 @@ jobs:

- name: Prepare artifacts
run: |
mkdir artifacts\
mkdir publish\
mkdir publish\primext
mkdir publish\primext\bin
mkdir publish\primext\devkit
move build\${{ matrix.build_conf }}\* publish\
move game_dir\* publish\primext
Compress-Archive -Path publish\* -Destination artifacts\primext-${{ matrix.cmake_preset }}.zip
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Windows
path: |
publish/*
name: artifact-${{ matrix.cmake_preset }}
path: artifacts/*

build-linux:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -106,20 +107,21 @@ jobs:

- name: Prepare artifacts
run: |
mkdir artifacts/
mkdir publish/
mkdir publish/primext
mkdir publish/primext/bin
mkdir publish/primext/devkit
cp -r build/${{ matrix.build_conf }}/primext/* publish/primext/
cp build/${{ matrix.build_conf }}/primext_run publish/
cp -r game_dir/* publish/primext
zip -r artifacts/primext-${{ matrix.cmake_preset }}.zip publish
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Linux
path: |
publish/*
name: artifact-${{ matrix.cmake_preset }}
path: artifacts/*

build-android:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -153,21 +155,22 @@ jobs:
run: chmod +x ./gradlew && ./gradlew assembleDebug
working-directory: android

- name: Prepare artifacts
run: |
mkdir publish/
mkdir publish/primext
mkdir publish/primext/bin
mkdir publish/primext/devkit
cp android/app/build/outputs/apk/debug/app-debug.apk publish/primext-debug.apk
cp -r game_dir/* publish/primext
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: Android
path: |
publish/*
#- name: Prepare artifacts
# run: |
# mkdir artifacts/
# mkdir publish/
# mkdir publish/primext
# mkdir publish/primext/bin
# mkdir publish/primext/devkit
# cp android/app/build/outputs/apk/debug/app-debug.apk publish/primext-debug.apk
# cp -r game_dir/* publish/primext
# zip -r artifacts/primext-${{ matrix.cmake_preset }}.zip publish

#- name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: artifact-${{ matrix.cmake_preset }}
# path: artifacts/*

release:
name: release-builds
Expand All @@ -184,6 +187,8 @@ jobs:
- name: Fetch artifacts
if: ${{ always() && github.ref == 'refs/heads/master' && steps.pr-check.outputs.pr_found == 'false' }}
uses: actions/[email protected]
with:
path: artifacts/

- name: Remove old release
if: ${{ always() && github.ref == 'refs/heads/master' && steps.pr-check.outputs.pr_found == 'false' }}
Expand All @@ -198,20 +203,21 @@ jobs:
if: ${{ always() && github.ref == 'refs/heads/master' && steps.pr-check.outputs.pr_found == 'false' }}
continue-on-error: true
run: |
cd Windows
zip -r ../PrimeXT-Windows-x86.zip *
cd ../Linux
tar -czvf ../PrimeXT-Linux-i386.tar.gz *
#cd ../Android
#zip -r ../PrimeXT-Android.zip *
cd artifacts/
for i in artifact-*; do
mv "$i"/* .
rm -rf "$i"
done
ls -R .
cd ../
sleep 20s
- name: Upload new release
if: ${{ always() && github.ref == 'refs/heads/master' && steps.pr-check.outputs.pr_found == 'false' }}
uses: softprops/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: PrimeXT-*
files: artifacts/*
tag_name: continious
draft: false
prerelease: true
Expand Down

0 comments on commit 3a43334

Please sign in to comment.