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 5906935 commit c8f0e00
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,16 @@ jobs:
java-package: "jre"
architecture: ${{ matrix.arch }}

# java.security 开放tls1 Windows
- name: Enable tls1
if: ${{ runner.os == 'Windows' }}
run: |
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\( TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "${{ env.JAVA_HOME }}/conf/security/java.security"
- name: Enable TLS 1.0 and 1.1 in java.security
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
elif [ "$RUNNER_OS" = "Linux" ]; then
if [ "$RUNNER_OS" = "Linux" ]; then
sed -i "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
elif [ "$RUNNER_OS" = "macOS" ]; then
sed -i '' "s/\(^jdk.tls.disabledAlgorithms=\)\(.*\)\(TLSv1, TLSv1.1,\)\(.*\)/\1\2\4/" "$JAVA_HOME/conf/security/java.security"
Expand Down

0 comments on commit c8f0e00

Please sign in to comment.