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]