From 1a9698d3ed9d3dfa92e399c889d14f9cea3d0a42 Mon Sep 17 00:00:00 2001 From: Virgil R Date: Sun, 18 Feb 2024 15:27:04 +0100 Subject: [PATCH 1/5] EW new workflow (#24) --- ...{release-publish.yml => release-build.yml} | 16 ++----------- .github/workflows/release-publish | 23 +++++++++++++++++++ .../workflows/workflow-release-android.yml | 23 ++++++++----------- .../workflow-release-linux-arm64.yml | 2 +- .../workflow-release-linux-armhf.yml | 12 ++-------- .../workflows/workflow-release-linux-x86.yml | 2 +- .github/workflows/workflow-release-linux.yml | 2 +- .github/workflows/workflow-release-mac.yml | 9 ++++---- .../workflows/workflow-release-prepare.yml | 19 +++++++-------- .../workflows/workflow-release-windows.yml | 7 +++--- package.json | 17 -------------- 11 files changed, 55 insertions(+), 77 deletions(-) rename .github/workflows/{release-publish.yml => release-build.yml} (83%) create mode 100644 .github/workflows/release-publish diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-build.yml similarity index 83% rename from .github/workflows/release-publish.yml rename to .github/workflows/release-build.yml index 8ac245e4..7b0eeef3 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-build.yml @@ -1,9 +1,6 @@ -name: Release all +name: Build all files on: - release: - types: - - published workflow_dispatch: jobs: @@ -48,16 +45,7 @@ jobs: with: electron: 3.1.0 node: 20 - - #Android - package-android: - uses: ./.github/workflows/workflow-release-android.yml - secrets: inherit - needs: prepare - with: - android: 12.0.1 - node: 20 - + #Windows package-windows: uses: ./.github/workflows/workflow-release-windows.yml diff --git a/.github/workflows/release-publish b/.github/workflows/release-publish new file mode 100644 index 00000000..ec0861b6 --- /dev/null +++ b/.github/workflows/release-publish @@ -0,0 +1,23 @@ +name: Release all + +on: + release: + types: + - published + workflow_dispatch: + +jobs: + prepare: + uses: ./.github/workflows/workflow-release-prepare.yml + secrets: inherit + with: + node: 20 + + #Android + package-android: + uses: ./.github/workflows/workflow-release-android.yml + secrets: inherit + needs: prepare + with: + android: 12.0.1 + node: 20 diff --git a/.github/workflows/workflow-release-android.yml b/.github/workflows/workflow-release-android.yml index 68ed92ba..a18e956c 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: @@ -88,20 +88,17 @@ jobs: KEYSTORE: ${{ steps.keystore.outputs.filePath }} - name: Upload aab 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/platforms/android/app/build/outputs/bundle/release/app-release.aab - asset_name: app-release.aab - tag: ${{ github.ref }} - + path: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/bundle/release/app-release.aab + name: app-release.aab + compression-level: 0 - name: Upload apk 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/platforms/android/app/build/outputs/apk/release/app-release.apk - asset_name: app-release.apk - tag: ${{ github.ref }} + path: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/apk/release/app-release.apk + name: app-release.apk + compression-level: 0 - name: Upload to the Amazon AppStore continue-on-error: true uses: ALJAZEERAPLUS/amazon-appstore-action@v1.1.1 @@ -110,4 +107,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..90af45f2 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,13 +53,5 @@ jobs: cordova build electron --no-telemetry --release env: GH_TOKEN: '${{ secrets.GH_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-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..abd4edd3 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: 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/package.json b/package.json index 19a86390..d2aa8c93 100755 --- a/package.json +++ b/package.json @@ -147,23 +147,6 @@ "flatpak": { "baseVersion": "23.08", "runtimeVersion": "23.08" - }, - "publish": [ - { - "provider": "github", - "releaseType": "release" - }, - { - "provider": "snapStore", - "channels": [ - "stable" - ] - } - ], - "win": { - "publish": [ - "github" - ] } } } From 7d126498b3d65cc987f51f921c1b980067261fb8 Mon Sep 17 00:00:00 2001 From: Virgil R Date: Sun, 18 Feb 2024 16:55:08 +0100 Subject: [PATCH 2/5] Start 2.0.4 and fix release (#25) --- .../workflows/workflow-release-android.yml | 20 ++++++----- .../workflow-release-linux-armhf.yml | 9 +++++ .github/workflows/workflow-release-linux.yml | 10 ++++++ .github/workflows/workflow-release-zip.yml | 36 +++++++++++++++++++ config.xml | 2 +- package.json | 2 +- 6 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/workflow-release-zip.yml diff --git a/.github/workflows/workflow-release-android.yml b/.github/workflows/workflow-release-android.yml index a18e956c..2ad87d66 100644 --- a/.github/workflows/workflow-release-android.yml +++ b/.github/workflows/workflow-release-android.yml @@ -86,19 +86,21 @@ 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: actions/upload-artifact@v4 + uses: svenstaro/upload-release-action@v2 with: - path: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/bundle/release/app-release.aab - name: app-release.aab - compression-level: 0 + 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: actions/upload-artifact@v4 + uses: svenstaro/upload-release-action@v2 with: - path: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/apk/release/app-release.apk - name: app-release.apk - compression-level: 0 + repo_token: ${{ secrets.GH_TOKEN }} + file: /home/runner/work/Ellas-War/Ellas-War/platforms/android/app/build/outputs/apk/release/app-release.apk + asset_name: app-release.apk + tag: ${{ github.ref }} - name: Upload to the Amazon AppStore continue-on-error: true uses: ALJAZEERAPLUS/amazon-appstore-action@v1.1.1 diff --git a/.github/workflows/workflow-release-linux-armhf.yml b/.github/workflows/workflow-release-linux-armhf.yml index 90af45f2..585b26d4 100644 --- a/.github/workflows/workflow-release-linux-armhf.yml +++ b/.github/workflows/workflow-release-linux-armhf.yml @@ -55,3 +55,12 @@ jobs: GH_TOKEN: '${{ secrets.GH_TOKEN }}' 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-linux.yml b/.github/workflows/workflow-release-linux.yml index abd4edd3..94ed217c 100644 --- a/.github/workflows/workflow-release-linux.yml +++ b/.github/workflows/workflow-release-linux.yml @@ -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-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 d2aa8c93..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", From 934e300f999261afc14e310305fd94312cf3be8c Mon Sep 17 00:00:00 2001 From: Virgil R Date: Sun, 18 Feb 2024 17:19:15 +0100 Subject: [PATCH 3/5] Fix extension --- .github/workflows/{release-publish => release-publish.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{release-publish => release-publish.yml} (100%) diff --git a/.github/workflows/release-publish b/.github/workflows/release-publish.yml similarity index 100% rename from .github/workflows/release-publish rename to .github/workflows/release-publish.yml From 199aa630eb926549d2b49e67d9e853fbc98ff7d9 Mon Sep 17 00:00:00 2001 From: Virgil R Date: Sun, 18 Feb 2024 17:21:20 +0100 Subject: [PATCH 4/5] Update release-publish.yml --- .github/workflows/release-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index ec0861b6..293c06e9 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -21,3 +21,8 @@ jobs: with: android: 12.0.1 node: 20 + + #Upload ZIP + zip: + uses: ./.github/workflows/workflow-release-zip.yml + secrets: inherit From 70bc6d5e18b2e808904b20644188325056cca13d Mon Sep 17 00:00:00 2001 From: Virgil R Date: Sun, 18 Feb 2024 17:22:32 +0100 Subject: [PATCH 5/5] Update release-publish.yml --- .github/workflows/release-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 293c06e9..638323ce 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -26,3 +26,4 @@ jobs: zip: uses: ./.github/workflows/workflow-release-zip.yml secrets: inherit + needs: prepare