[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-13 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1069659532


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > please try
   > 
   > ```c
   > env:
   >   SCRIPT_PATH: ${{ github.event.inputs.current_version }}
   > ```
   
   seems a little redundant, and I found the rightway in [official 
doc](https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows)
 to use the it & avoid the long var name
   
   and we should also use  **lowercase variables** in `inputs` or `matrix` 
param as the 
[doc-refer](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs)
 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-13 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1069659532


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > please try
   > 
   > ```c
   > env:
   >   SCRIPT_PATH: ${{ github.event.inputs.current_version }}
   > ```
   
   seems a little redundant, and I found the rightway in [official 
doc](https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows)
 to use the it & avoid the long var name
   
   and we should also use  lowercase variables in `inputs` or `matrix` param as 
the 
[doc-refer](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs)
 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-13 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1069659532


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > please try
   > 
   > ```c
   > env:
   >   SCRIPT_PATH: ${{ github.event.inputs.current_version }}
   > ```
   
   seems a little redundant, and I found the rightway in [official 
doc](https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows)
 to use the param to avoid the long var name
   
   and we should also use  lowercase variables in `inputs` or `matrix` param as 
the 
[doc-refer](https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs)
 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-13 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1069659532


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > please try
   > 
   > ```c
   > env:
   >   SCRIPT_PATH: ${{ github.event.inputs.current_version }}
   > ```
   
   seems a little redundant, and I found the rightway in [official 
doc](https://docs.github.com/zh/actions/using-workflows/events-that-trigger-workflows)
 to use the param to avoid the long var name



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-11 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1067109524


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > like env SCRIPT_PATH at line 17. for more details 
[docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values](https://docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values)
   
   The env params is **fixed**, and we need a flexible params like the 
pic(modify the value when we want to run the action), how could we define it 
flexible by using `env`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-11 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1067109524


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > like env SCRIPT_PATH at line 17. for more details 
[docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values](https://docs.github.com/en/actions/learn-github-actions/variables#using-the-vars-context-to-access-configuration-variable-values)
   
   The env params is **fixed**, and we need a flexible params like the 
pic(modify the value when we want to run the action), how could we define a 
flexible using `env`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-11 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1067073731


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > `bash $SCRIPT_PATH/validate-release.sh $RELEASE_VERSION`
   
   how to get the flexible input frame like this? 
   
   https://user-images.githubusercontent.com/17706099/211841127-10b23301-e7c1-4a24-98b7-7f264cdce855.png";>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-11 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1067073731


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   > `bash $SCRIPT_PATH/validate-release.sh $RELEASE_VERSION`
   
   how to get the flexible input frame like this? 
   
   https://user-images.githubusercontent.com/17706099/211833627-3c44fa92-bd2e-4179-a2b9-9eb73de4eb1d.png";>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



[GitHub] [incubator-hugegraph] imbajin commented on a diff in pull request #2076: chore: support validate apache release automatically

2023-01-09 Thread GitBox


imbajin commented on code in PR #2076:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2076#discussion_r1065380663


##
.github/workflows/validate-release.yml:
##
@@ -0,0 +1,58 @@
+name: Validate Apache Release
+
+on:
+  workflow_dispatch:
+inputs:
+  current_version:
+required: true
+default: '1.0.0'
+  deploy_maven:
+required: true
+default: 'false'
+
+jobs:
+  build:
+runs-on: ubuntu-latest
+env:
+  SCRIPT_PATH: hugegraph-dist/scripts/
+steps:
+  - name: Checkout source
+uses: actions/checkout@v3
+  - name: Install JDK ${{ matrix.JAVA_VERSION }}
+uses: actions/setup-java@v3
+with:
+  java-version: ${{ matrix.JAVA_VERSION }}
+  distribution: 'adopt'
+  - name: Cache Maven packages
+uses: actions/cache@v3
+with:
+  path: ~/.m2
+  key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+  restore-keys: ${{ runner.os }}-m2
+  - name: Get Yarn path
+id: yarn-cache-dir-path
+run: echo "::set-output name=dir::$(yarn cache dir)"
+  - name: Cache Yarn packages
+uses: actions/cache@v3
+# use id to check `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 
'true'`)
+id: yarn-cache
+with:
+  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
+  restore-keys: |
+${{ runner.os }}-yarn-
+
+
+  # TODO: do we need svn & gpg environment?
+  - name: Test Building Source & Running
+run: |
+  bash $SCRIPT_PATH/validate-release.sh ${{ 
github.event.inputs.current_version }} \

Review Comment:
   means change the var name from `current_version` to `release_version` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]