Skip to content

Commit

Permalink
chore: Optimize action
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryFan626 committed Nov 12, 2023
1 parent 1446275 commit 6ed7ad8
Showing 1 changed file with 26 additions and 8 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ jobs:
- name: Copy JRE to static directory
run: |
mkdir -p chat2db-client/static/jre
cp -r "${JAVA_HOME}" chat2db-client/static/jre
if [[ "${{ runner.os }}" != "Windows" ]]; then
cp -r "$JAVA_HOME" chat2db-client/static/jre
if [ "${{ runner.os }}" != "Windows" ]; then
chmod -R 777 chat2db-client/static/jre
fi
shell: bash
env:
JAVA_HOME: ${{ env.JAVA_HOME }}

Expand All @@ -83,15 +84,23 @@ jobs:
distribution: "temurin"
cache: "maven"

- name: Cache Yarn dependencies
uses: actions/cache@v3
- name: Cache Yarn Dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
node_modules
key: {{ runner.os }}-yarn-{{ hashFiles('**/yarn.lock') }}

- name: Restore Yarn Cache
uses: actions/cache@v2
with:
path: |
${{ runner.temp }}/yarn
${{ runner.temp }}/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
~/.cache/yarn
node_modules
key: {{ runner.os }}-yarn-{{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
{{ runner.os }}-yarn-{{ runner.os }}-
- name: Build FE Static
run: |
Expand Down Expand Up @@ -188,3 +197,12 @@ jobs:
"title": "${{ matrix.os }}-test-打包完成通知",
"text": "# ${{ matrix.os }}-test-打包完成通知\n ![bang](https://oss.sqlgpt.cn/static/bang100.gif)\n ### 任务id:[${{ github.run_id }}](https://github.com/chat2db/Chat2DB/actions/runs/${{ github.run_id }})\n ### 下载地址:[https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/${{ matrix.os }}-Test${{ matrix.file_extension }}](https://oss.sqlgpt.cn/test/99.0.${{ github.run_id }}/${{ matrix.os }}-Test${{ matrix.file_extension }})"
}
- name: Save Yarn Cache
uses: actions/cache@v2
with:
path: |
~/.cache/yarn
node_modules
key: {{ runner.os }}-yarn-{{ hashFiles('**/yarn.lock') }}
save-key: {{ runner.os }}-yarn-{{ hashFiles('**/yarn.lock') }}

0 comments on commit 6ed7ad8

Please sign in to comment.