Skip to content

Commit f4a376e

Browse files
committed
chore: Optimize action
1 parent f163bd5 commit f4a376e

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/release_test.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ jobs:
1313
include:
1414
- os: windows-latest
1515
file_extension: ".exe"
16+
build_arg: "--win --x64"
1617
- os: macos-latest
1718
arch: x86_64
1819
file_extension: ".dmg"
20+
build_arg: "--mac --x64"
1921
- os: macos-latest
2022
arch: arm64
2123
file_extension: ".dmg"
24+
build_arg: "--mac --arm64"
2225
- os: ubuntu-latest
2326
file_extension: ".AppImage"
27+
build_arg: "--linux"
2428
runs-on: ${{ matrix.os }}
2529

2630
steps:
@@ -38,14 +42,15 @@ jobs:
3842
- name: Enable TLS 1.0 and 1.1 in java.security
3943
run: |
4044
if [[ "${{ runner.os }}" == "Windows" ]]; then
41-
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
45+
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
4246
elif [[ "${{ runner.os }}" == "Linux" ]]; then
43-
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
47+
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" ${{ env.JAVA_HOME }}/conf/security/java.security
4448
else
4549
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" $JAVA_HOME/conf/security/java.security
4650
fi
47-
env:
48-
JAVA_HOME: ${{ env.JAVA_HOME }}
51+
shell: bash
52+
53+
4954

5055
- name: Copy JRE to static directory
5156
run: |
@@ -74,10 +79,12 @@ jobs:
7479
- name: Cache Yarn dependencies
7580
uses: actions/cache@v3
7681
with:
77-
path: "**/node_modules"
78-
key: yarn-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
82+
path: |
83+
${{ runner.temp }}/yarn
84+
${{ runner.temp }}/node_modules
85+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
7986
restore-keys: |
80-
yarn-${{ runner.os }}-
87+
${{ runner.os }}-yarn-
8188
8289
- name: Build FE Static
8390
run: |
@@ -125,7 +132,7 @@ jobs:
125132
-c.win.publisherName=Chat2DB-Test
126133
-c.nsis.shortcutName=Chat2DB-Test
127134
-c.extraMetadata.version=99.0.${{ github.run_id }}-Test
128-
--${{ matrix.os }} ${{ matrix.arch }}
135+
${{ matrix.build_arg}}
129136
130137
# Only for macOS x86_64
131138
- name: Notarize MacOS x86_64 App

0 commit comments

Comments
 (0)