Browse Source

feat: add flag to test assets builder in CI (#1590)

Baptiste Augrain 1 year ago
parent
commit
f51c90526f

+ 6 - 1
.github/workflows/insider-linux.yml

@@ -9,6 +9,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 8 * * *'
   push:
@@ -51,6 +54,8 @@ jobs:
         run: ./get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: ./check_cron_or_pr.sh
 
   dependencies:
@@ -181,7 +186,7 @@ jobs:
 
       - name: Prepare assets
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 6 - 1
.github/workflows/insider-macos.yml

@@ -9,6 +9,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 8 * * *'
   push:
@@ -58,6 +61,8 @@ jobs:
         run: . get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: . check_cron_or_pr.sh
 
       - name: Check existing VSCodium tags/releases
@@ -79,7 +84,7 @@ jobs:
           CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
           CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 6 - 1
.github/workflows/insider-windows.yml

@@ -9,6 +9,9 @@ on:
       new_release:
         type: boolean
         description: Force new Release
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 8 * * *'
   push:
@@ -71,6 +74,8 @@ jobs:
         run: ./get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: ./check_cron_or_pr.sh
 
       - name: Check existing VSCodium tags/releases
@@ -90,7 +95,7 @@ jobs:
 
       - name: Prepare assets
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 6 - 1
.github/workflows/stable-linux.yml

@@ -9,6 +9,9 @@ on:
       force_version:
         type: boolean
         description: Force update version
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -48,6 +51,8 @@ jobs:
         run: ./get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: ./check_cron_or_pr.sh
 
   dependencies:
@@ -176,7 +181,7 @@ jobs:
 
       - name: Prepare assets
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 6 - 1
.github/workflows/stable-macos.yml

@@ -9,6 +9,9 @@ on:
       force_version:
         type: boolean
         description: Force update version
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -53,6 +56,8 @@ jobs:
         run: . get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: . check_cron_or_pr.sh
 
       - name: Check existing VSCodium tags/releases
@@ -74,7 +79,7 @@ jobs:
           CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
           CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 6 - 1
.github/workflows/stable-windows.yml

@@ -9,6 +9,9 @@ on:
       force_version:
         type: boolean
         description: Force update version
+      test_asset_builder:
+        type: boolean
+        description: Test the assets builder
   schedule:
     - cron: '0 18 * * *'
   push:
@@ -67,6 +70,8 @@ jobs:
         run: ./get_repo.sh
 
       - name: Check PR or cron
+        env:
+          TEST_ASSET_BUILDER: ${{ github.event.inputs.test_asset_builder }}
         run: ./check_cron_or_pr.sh
 
       - name: Check existing VSCodium tags/releases
@@ -86,7 +91,7 @@ jobs:
 
       - name: Prepare assets
         run: ./prepare_assets.sh
-        if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
+        if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.test_asset_builder == 'true')
 
       - name: Release
         env:

+ 10 - 3
check_cron_or_pr.sh

@@ -14,16 +14,23 @@ elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
 	export SHOULD_BUILD="yes"
 	export SHOULD_DEPLOY="no"
 elif [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
-	echo "It's a Dispatch"
+  if [[ "${TEST_ASSET_BUILDER}" == "true" ]]; then
+    echo "It's testing the assets builder"
 
-  export SHOULD_DEPLOY="yes"
+    export SHOULD_BUILD="yes"
+    export SHOULD_DEPLOY="no"
+  else
+  	echo "It's a Dispatch"
+
+    export SHOULD_DEPLOY="yes"
+  fi
 else
 	echo "It's a Cron"
 
 	export SHOULD_DEPLOY="yes"
 fi
 
-if [[ "${GITHUB_ENV}" ]]; then 
+if [[ "${GITHUB_ENV}" ]]; then
   echo "GITHUB_BRANCH=${GITHUB_BRANCH}" >> "${GITHUB_ENV}"
   echo "SHOULD_BUILD=${SHOULD_BUILD}" >> "${GITHUB_ENV}"
   echo "SHOULD_DEPLOY=${SHOULD_DEPLOY}" >> "${GITHUB_ENV}"