This is an automated email from the ASF dual-hosted git repository.

tiagobento pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-kogito-apps.git


The following commit(s) were added to refs/heads/main by this push:
     new 968ad48ad NO-ISSUE: Publish weekly JIT executor native packages with 
the "dev" tag and add the ability to manually trigger the workflow (#2004)
968ad48ad is described below

commit 968ad48adfaf8dea16d7e6f70c59a51c77094360
Author: Rodrigo Antunes <[email protected]>
AuthorDate: Wed Mar 6 16:49:04 2024 -0300

    NO-ISSUE: Publish weekly JIT executor native packages with the "dev" tag 
and add the ability to manually trigger the workflow (#2004)
    
    * Publish weekluy JIT executor native packages with the "dev" tag
    
    * Add manual trigger to the JIT executor workflow job
    
    * Add manual trigger to the JIT executor workflow job
    
    * Fix TAG
    
    * Fix TAG
    
    * Remove conditional
---
 .github/workflows/publish-jitexecutor-native.yml | 31 ++++++++++++++++++++----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/publish-jitexecutor-native.yml 
b/.github/workflows/publish-jitexecutor-native.yml
index 473d9e2af..64141fb56 100644
--- a/.github/workflows/publish-jitexecutor-native.yml
+++ b/.github/workflows/publish-jitexecutor-native.yml
@@ -1,6 +1,17 @@
 name: "Publish jitexecutor-native"
 
 on:
+  workflow_dispatch:
+    inputs:
+      kogito_runtime_version:
+        description: "Kogito Runtime version"
+        required: true
+      npm_version:
+        description: "NPM Version"
+        required: true
+      npm_tag:
+        description: "NPM Tag"
+        required: true
   schedule:
     - cron: '0 16 * * 0' # Every sunday at 4:00PM
 
@@ -21,10 +32,19 @@ jobs:
       - name: Set version
         id: version
         run: | 
-          VERSION="999-${{ steps.date.outputs.CURRENT_DATE }}"
-          echo "TAG=$VERSION" >> "$GITHUB_OUTPUT"
-          echo "PROJECT_VERSION=$VERSION-SNAPSHOT" >> "$GITHUB_OUTPUT"
-          echo "NPM_VERSION=999.0.0-${{ steps.date.outputs.CURRENT_DATE 
}}-SNAPSHOT" >> "$GITHUB_OUTPUT"
+          if [ ${{ github.event_name }} == "schedule" ]; then
+            VERSION="999-${{ steps.date.outputs.CURRENT_DATE }}"
+            echo "TAG=$VERSION" >> "$GITHUB_OUTPUT"
+            echo "PROJECT_VERSION=$VERSION-SNAPSHOT" >> "$GITHUB_OUTPUT"
+            echo "NPM_VERSION=999.0.0-${{ steps.date.outputs.CURRENT_DATE 
}}-SNAPSHOT" >> "$GITHUB_OUTPUT"
+            echo "NPM_TAG=dev" >> "$GITHUB_OUTPUT"
+          else
+            VERSION="${{ github.event.inputs.kogito_runtime_version }}"
+            echo "TAG=${VERSION//-SNAPSHOT/}" >> "$GITHUB_OUTPUT"
+            echo "PROJECT_VERSION=$VERSION" >> "$GITHUB_OUTPUT"
+            echo "NPM_VERSION=${{ github.event.inputs.npm_version }}" >> 
"$GITHUB_OUTPUT"
+            echo "NPM_TAG=${{ github.event.inputs.npm_tag }}" >> 
"$GITHUB_OUTPUT"
+          fi
         shell: bash
 
       - name: "Set long paths for Windows"
@@ -116,6 +136,7 @@ jobs:
     outputs:
       package_version: ${{ steps.version.outputs.PROJECT_VERSION }}
       npm_version: ${{ steps.version.outputs.NPM_VERSION }}
+      npm_tag: ${{ steps.version.outputs.NPM_TAG }}
 
   pack_and_publish:
     runs-on: ubuntu-latest
@@ -152,4 +173,4 @@ jobs:
           mv ./dist/win32/jitexecutor-runner-${{ 
needs.build_jitexecutor_native_binaries.outputs.package_version }}-runner.exe 
./dist/win32/jitexecutor.exe
           npm version ${{ 
needs.build_jitexecutor_native_binaries.outputs.npm_version }}
           echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
-          npm publish --access public
+          npm publish --tag ${{ 
needs.build_jitexecutor_native_binaries.outputs.npm_tag }} --access public


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to