Skip to content

Commit

Permalink
Merge branch 'master' of github.com:V-Paranoiaque/Ellas-War
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Paranoiaque committed Feb 18, 2024
2 parents 329d587 + 70bc6d5 commit c9073b8
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 98 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build all files

on:
workflow_dispatch:

jobs:
prepare:
uses: ./.github/workflows/workflow-release-prepare.yml
secrets: inherit
with:
node: 20

#X64 Arch
package-x64:
uses: ./.github/workflows/workflow-release-linux.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#X86 Arch
package-x86:
uses: ./.github/workflows/workflow-release-linux-x86.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#arm64 Arch
package-arm64:
uses: ./.github/workflows/workflow-release-linux-arm64.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#armhf Arch
package-armv7l:
uses: ./.github/workflows/workflow-release-linux-armhf.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#Windows
package-windows:
uses: ./.github/workflows/workflow-release-windows.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#Mac OS
package-mac:
uses: ./.github/workflows/workflow-release-mac.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20
54 changes: 3 additions & 51 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,6 @@ jobs:
with:
node: 20

#X64 Arch
package-x64:
uses: ./.github/workflows/workflow-release-linux.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#X86 Arch
package-x86:
uses: ./.github/workflows/workflow-release-linux-x86.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#arm64 Arch
package-arm64:
uses: ./.github/workflows/workflow-release-linux-arm64.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#armhf Arch
package-armv7l:
uses: ./.github/workflows/workflow-release-linux-armhf.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#Android
package-android:
uses: ./.github/workflows/workflow-release-android.yml
Expand All @@ -57,21 +21,9 @@ jobs:
with:
android: 12.0.1
node: 20

#Windows
package-windows:
uses: ./.github/workflows/workflow-release-windows.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20

#Mac OS
package-mac:
uses: ./.github/workflows/workflow-release-mac.yml
#Upload ZIP
zip:
uses: ./.github/workflows/workflow-release-zip.yml
secrets: inherit
needs: prepare
with:
electron: 3.1.0
node: 20
7 changes: 3 additions & 4 deletions .github/workflows/workflow-release-android.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android
name: Workflow Android

on:
workflow_call:
Expand Down Expand Up @@ -86,15 +86,14 @@ jobs:
AAB_JSON: ${{ steps.aab_json.outputs.filePath }}
APK_JSON: ${{ steps.apk_json.outputs.filePath }}
KEYSTORE: ${{ steps.keystore.outputs.filePath }}

- name: Upload aab file to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/bundle/release/app-release.aab
asset_name: app-release.aab
tag: ${{ github.ref }}

- name: Upload apk file to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -110,4 +109,4 @@ jobs:
client-secret: ${{secrets.AMAZON_APPSTORE_CLIENT_SECRET}}
app-id: ${{ secrets.AMAZON_APPSTORE_APP_ID }}
apk-file: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/apk/release/app-release.apk


2 changes: 1 addition & 1 deletion .github/workflows/workflow-release-linux-arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Arm64
name: Workflow Linux Arm64

on:
workflow_call:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/workflow-release-linux-armhf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux Armhf
name: Workflow Linux Armhf

on:
workflow_call:
Expand Down Expand Up @@ -53,6 +53,7 @@ jobs:
cordova build electron --no-telemetry --release
env:
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
SNAPCRAFT_STORE_CREDENTIALS: '${{ secrets.SNAPCRAFT_TOKEN }}'

- name: Publish Snap
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-release-linux-x86.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux x86
name: Workflow Linux x86

on:
workflow_call:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/workflow-release-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linux
name: Workflow Linux

on:
workflow_call:
Expand Down Expand Up @@ -79,3 +79,13 @@ jobs:
env:
WORKSPACE: '${{ github.workspace }}'
SNAPCRAFT_STORE_CREDENTIALS: '${{ secrets.SNAPCRAFT_TOKEN }}'

- name: Publish Snap
run: |
FILE=$(ls platforms/electron/build/*.snap)
for i in $FILE
do
snapcraft upload --release=stable $i
done
env:
SNAPCRAFT_STORE_CREDENTIALS: '${{ secrets.SNAPCRAFT_TOKEN }}'
9 changes: 4 additions & 5 deletions .github/workflows/workflow-release-mac.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Mac
name: Workflow Mac

on:
workflow_call:
Expand Down Expand Up @@ -36,10 +36,9 @@ jobs:
npm install
- name: Download the project
uses: robinraju/[email protected]
uses: actions/download-artifact@v4
with:
latest: true
fileName: "mobile.zip"
name: "mobile.zip"
- name: Extract the project
run: unzip mobile.zip

Expand All @@ -49,4 +48,4 @@ jobs:
cordova platform add electron@^${{ inputs.electron }}
cordova build electron --no-telemetry --release
env:
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
GH_TOKEN: '${{ secrets.GH_TOKEN }}'
19 changes: 8 additions & 11 deletions .github/workflows/workflow-release-prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ jobs:
zip -r mobile.zip www
- name: Upload web zip file to release
uses: svenstaro/upload-release-action@v2
uses: actions/upload-artifact@v4
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: /home/runner/work/Ellas-War/Ellas-War/web.zip
asset_name: web.zip
tag: ${{ github.ref }}

path: /home/runner/work/Ellas-War/Ellas-War/web.zip
name: web.zip
compression-level: 0
- name: Upload mobile zip file to release
uses: svenstaro/upload-release-action@v2
uses: actions/upload-artifact@v4
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: /home/runner/work/Ellas-War/Ellas-War/mobile.zip
asset_name: mobile.zip
tag: ${{ github.ref }}
path: /home/runner/work/Ellas-War/Ellas-War/mobile.zip
name: mobile.zip
compression-level: 0
7 changes: 3 additions & 4 deletions .github/workflows/workflow-release-windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows
name: Workflow Windows

on:
workflow_call:
Expand Down Expand Up @@ -150,10 +150,9 @@ jobs:
npm install
- name: Download the project
uses: robinraju/[email protected]
uses: actions/download-artifact@v4
with:
latest: true
fileName: "mobile.zip"
name: "mobile.zip"
- name: Extract the project
run: unzip mobile.zip

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/workflow-release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Zip

on:
workflow_call:

jobs:
zip:
name: "Publish Zip"
runs-on: ubuntu-22.04

steps:
- name: Download the mobile project
uses: actions/download-artifact@v4
with:
name: "mobile.zip"
- name: Download the web project
uses: actions/download-artifact@v4
with:
name: "web.zip"

# Upload
- name: Upload web zip file to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: ./web.zip
asset_name: web.zip
tag: ${{ github.ref }}

- name: Upload mobile zip file to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GH_TOKEN }}
file: ./mobile.zip
asset_name: mobile.zip
tag: ${{ github.ref }}
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget android-packageName="com.ellaswar.ewnextmobile" id="ellaswar" version="2.0.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget android-packageName="com.ellaswar.ewnextmobile" id="ellaswar" version="2.0.4" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>EllasWar</name>
<description>
Desktop/Mobile application for the online game ellaswar.com.
Expand Down
19 changes: 1 addition & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@v-paranoiaque/ew",
"description": "Front-end of the Ellas War Game",
"version": "2.0.3",
"version": "2.0.4",
"homepage": "https://ellaswar.eu",
"author": {
"name": "Ellas War Team",
Expand Down Expand Up @@ -147,23 +147,6 @@
"flatpak": {
"baseVersion": "23.08",
"runtimeVersion": "23.08"
},
"publish": [
{
"provider": "github",
"releaseType": "release"
},
{
"provider": "snapStore",
"channels": [
"stable"
]
}
],
"win": {
"publish": [
"github"
]
}
}
}

0 comments on commit c9073b8

Please sign in to comment.