diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml new file mode 100644 index 00000000..7b0eeef3 --- /dev/null +++ b/.github/workflows/release-build.yml @@ -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 diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 8ac245e4..638323ce 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -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 @@ -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 diff --git a/.github/workflows/workflow-release-android.yml b/.github/workflows/workflow-release-android.yml index 68ed92ba..2ad87d66 100644 --- a/.github/workflows/workflow-release-android.yml +++ b/.github/workflows/workflow-release-android.yml @@ -1,4 +1,4 @@ -name: Android +name: Workflow Android on: workflow_call: @@ -86,7 +86,7 @@ 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: @@ -94,7 +94,6 @@ jobs: 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: @@ -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 - \ No newline at end of file + diff --git a/.github/workflows/workflow-release-linux-arm64.yml b/.github/workflows/workflow-release-linux-arm64.yml index ec4c8114..813978f6 100644 --- a/.github/workflows/workflow-release-linux-arm64.yml +++ b/.github/workflows/workflow-release-linux-arm64.yml @@ -1,4 +1,4 @@ -name: Linux Arm64 +name: Workflow Linux Arm64 on: workflow_call: diff --git a/.github/workflows/workflow-release-linux-armhf.yml b/.github/workflows/workflow-release-linux-armhf.yml index a98f0449..585b26d4 100644 --- a/.github/workflows/workflow-release-linux-armhf.yml +++ b/.github/workflows/workflow-release-linux-armhf.yml @@ -1,4 +1,4 @@ -name: Linux Armhf +name: Workflow Linux Armhf on: workflow_call: @@ -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: | diff --git a/.github/workflows/workflow-release-linux-x86.yml b/.github/workflows/workflow-release-linux-x86.yml index acde30c2..b062c5bb 100644 --- a/.github/workflows/workflow-release-linux-x86.yml +++ b/.github/workflows/workflow-release-linux-x86.yml @@ -1,4 +1,4 @@ -name: Linux x86 +name: Workflow Linux x86 on: workflow_call: diff --git a/.github/workflows/workflow-release-linux.yml b/.github/workflows/workflow-release-linux.yml index 88a79004..94ed217c 100644 --- a/.github/workflows/workflow-release-linux.yml +++ b/.github/workflows/workflow-release-linux.yml @@ -1,4 +1,4 @@ -name: Linux +name: Workflow Linux on: workflow_call: @@ -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 }}' diff --git a/.github/workflows/workflow-release-mac.yml b/.github/workflows/workflow-release-mac.yml index fd00868b..f3f61209 100644 --- a/.github/workflows/workflow-release-mac.yml +++ b/.github/workflows/workflow-release-mac.yml @@ -1,4 +1,4 @@ -name: Mac +name: Workflow Mac on: workflow_call: @@ -36,10 +36,9 @@ jobs: npm install - name: Download the project - uses: robinraju/release-downloader@v1.8 + uses: actions/download-artifact@v4 with: - latest: true - fileName: "mobile.zip" + name: "mobile.zip" - name: Extract the project run: unzip mobile.zip @@ -49,4 +48,4 @@ jobs: cordova platform add electron@^${{ inputs.electron }} cordova build electron --no-telemetry --release env: - GH_TOKEN: '${{ secrets.GH_TOKEN }}' \ No newline at end of file + GH_TOKEN: '${{ secrets.GH_TOKEN }}' diff --git a/.github/workflows/workflow-release-prepare.yml b/.github/workflows/workflow-release-prepare.yml index 01bc4831..16340969 100644 --- a/.github/workflows/workflow-release-prepare.yml +++ b/.github/workflows/workflow-release-prepare.yml @@ -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 diff --git a/.github/workflows/workflow-release-windows.yml b/.github/workflows/workflow-release-windows.yml index 98ae9d59..c3f0d7e1 100644 --- a/.github/workflows/workflow-release-windows.yml +++ b/.github/workflows/workflow-release-windows.yml @@ -1,4 +1,4 @@ -name: Windows +name: Workflow Windows on: workflow_call: @@ -150,10 +150,9 @@ jobs: npm install - name: Download the project - uses: robinraju/release-downloader@v1.8 + uses: actions/download-artifact@v4 with: - latest: true - fileName: "mobile.zip" + name: "mobile.zip" - name: Extract the project run: unzip mobile.zip diff --git a/.github/workflows/workflow-release-zip.yml b/.github/workflows/workflow-release-zip.yml new file mode 100644 index 00000000..ed78b0c5 --- /dev/null +++ b/.github/workflows/workflow-release-zip.yml @@ -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 }} diff --git a/config.xml b/config.xml index bde6d38f..873649b7 100755 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + EllasWar Desktop/Mobile application for the online game ellaswar.com. diff --git a/package.json b/package.json index 19a86390..74b2d606 100755 --- a/package.json +++ b/package.json @@ -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", @@ -147,23 +147,6 @@ "flatpak": { "baseVersion": "23.08", "runtimeVersion": "23.08" - }, - "publish": [ - { - "provider": "github", - "releaseType": "release" - }, - { - "provider": "snapStore", - "channels": [ - "stable" - ] - } - ], - "win": { - "publish": [ - "github" - ] } } }