diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index fcb6d31cc0c..f5b220d2d90 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 2 @@ -31,7 +31,7 @@ jobs: echo "=============== list changed files ===============" git diff --name-only HEAD^ HEAD - echo "::set-output name=run_job::false" + echo "run_job=false" >> $GITHUB_OUTPUT echo "========== check paths of changed files ==========" git diff --name-only HEAD^ HEAD > files.txt while IFS= read -r file @@ -39,17 +39,17 @@ jobs: echo $file if [[ $file == "netreflected/docs/README.md"* ]]; then echo "Recreate docs was requested" - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == ".github/workflows/docs.yaml"* ]]; then echo "Recreate docs was requested" - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == "netreflected/src/"* ]]; then echo "This file is under the directory 'netreflected/src/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi echo "This files are not in a source directory no action required" @@ -70,7 +70,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: persist-credentials: false submodules: 'true' diff --git a/.github/workflows/linux.yaml b/.github/workflows/linux.yaml index 0b81f558d6e..18749dab759 100644 --- a/.github/workflows/linux.yaml +++ b/.github/workflows/linux.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 2 @@ -31,7 +31,7 @@ jobs: echo "=============== list changed files ===============" git diff --name-only HEAD^ HEAD - echo "::set-output name=run_job::false" + echo "run_job=false" >> $GITHUB_OUTPUT echo "========== check paths of changed files ==========" git diff --name-only HEAD^ HEAD > files.txt while IFS= read -r file @@ -39,17 +39,17 @@ jobs: echo $file if [[ $file == ".github/workflows/linux.yaml"* ]]; then echo "This file is under the directory '.github/workflows/linux.yaml'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == "netreflected/src/"* ]]; then echo "This file is under the directory 'netreflected/src'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == "netreflected-tests/"* ]]; then echo "This file is under the directory 'netreflected-tests/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi echo "This files are not in a source directory no action required" @@ -65,7 +65,7 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: '1' @@ -75,12 +75,12 @@ jobs: # Install .NET SDKs - name: Setup .NET Core 3.1 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 3.1.x - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x @@ -100,6 +100,12 @@ jobs: dotnet bin/netcoreapp3.1/MASES.JCOReflectorCLI.dll -JobType CreateJars -JDKFolder /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/ -JobFile .github/workflows/createjars_core3.1_linux.job dotnet bin/net6.0/MASES.JCOReflectorCLI.dll -JobType CreateJars -JDKFolder /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/ -JobFile .github/workflows/createjars_core6.0_linux.job + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + cache: 'maven' + - name: Build Java test source file .NET Core 3.1 run: javac -cp ./bin/netcoreapp3.1/JCOReflector.jar ./netreflected-tests/java/src/hierarchy/*.java ./netreflected-tests/java/src/mscorlib/*.java ./netreflected-tests/java/src/nettest/*.java ./netreflected-tests/java/src/refout/*.java diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 368c0ffa70b..b08d01d8892 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 2 @@ -31,7 +31,7 @@ jobs: echo "=============== list changed files ===============" git diff --name-only HEAD^ HEAD - echo "::set-output name=run_job::false" + echo "run_job=false" >> $GITHUB_OUTPUT echo "========== check paths of changed files ==========" git diff --name-only HEAD^ HEAD > files.txt while IFS= read -r file @@ -39,17 +39,17 @@ jobs: echo $file if [[ $file == ".github/workflows/maven.yaml"* ]]; then echo "A change in workflow was made, a run is requested" - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == "src/engine/JCOPOMJCOReflector.template"* ]]; then echo "A change in template was made, a run is requested" - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $file == "netreflected/src/"* ]]; then echo "This file is under the directory 'netreflected/src/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi echo "This files are not in a source directory no action required" @@ -70,15 +70,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- + - uses: actions/checkout@v3 - name: Install gpg secret key run: | @@ -104,9 +96,11 @@ jobs: run: .\bin\net462\MASES.JCOReflectorCLI -JobType CreatePOM -JobFile .github\workflows\createpom_win19.job - name: Set up Apache Maven Central - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: # running setup-java again overwrites the settings.xml + distribution: temurin java-version: 11 + cache: 'maven' server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml server-username: MAVEN_USERNAME # env variable for username in deploy server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy diff --git a/.github/workflows/pullrequests.yaml b/.github/workflows/pullrequests.yaml index 0b9cddba9cd..aae83d2fc05 100644 --- a/.github/workflows/pullrequests.yaml +++ b/.github/workflows/pullrequests.yaml @@ -28,22 +28,22 @@ jobs: for added_modified_file in "${added_modified_files[@]}"; do if [[ $added_modified_file == ".github/workflows/pullrequests.yaml"* ]]; then echo "$added_modified_file is under the directory '.github/workflows'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected/src/JCOReflector/"* ]]; then echo "$added_modified_file is under the directory 'netreflected/src/JCOReflector'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "src/"* ]]; then echo "$added_modified_file is under the directory 'src/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected-tests/"* ]]; then echo "$added_modified_file is under the directory 'netreflected-tests/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi done @@ -67,7 +67,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: '1' @@ -75,7 +75,7 @@ jobs: - name: Build JCOReflectorCLI run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" src\JCOReflectorCLI.sln - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v1.1.1 with: nuget-version: '5.x' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dcdb00265cd..389a547688d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: 'true' @@ -33,7 +33,7 @@ jobs: - name: Build JCOReflectorCLI run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" src\JCOReflectorCLI.sln - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v1.1.1 with: nuget-version: '5.x' @@ -51,9 +51,11 @@ jobs: run: .\bin\net462\MASES.JCOReflectorCLI -JobType CreatePOM -POMStagingType Release -JobFile .github\workflows\createpom_win19.job - name: Set up Apache Maven Central - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: # running setup-java again overwrites the settings.xml + distribution: temurin java-version: 11 + cache: 'maven' server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml server-username: MAVEN_USERNAME # env variable for username in deploy server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy diff --git a/.github/workflows/testbranch.yaml b/.github/workflows/testbranch.yaml index eb7b3a33cec..062d3792d25 100644 --- a/.github/workflows/testbranch.yaml +++ b/.github/workflows/testbranch.yaml @@ -34,22 +34,22 @@ jobs: for added_modified_file in "${added_modified_files[@]}"; do if [[ $added_modified_file == ".github/workflows/testbranch.yaml"* ]]; then echo "$added_modified_file is under the directory '.github/workflows'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected/src/JCOReflector/"* ]]; then echo "$added_modified_file is under the directory 'netreflected/src/JCOReflector'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "src/"* ]]; then echo "$added_modified_file is under the directory 'src/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected-tests/"* ]]; then echo "$added_modified_file is under the directory 'netreflected-tests/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi done @@ -69,7 +69,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: '1' @@ -84,7 +84,7 @@ jobs: - name: Build JCOReflectorCLI run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" src\JCOReflectorCLI.sln - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v1.1.1 with: nuget-version: '5.x' @@ -171,7 +171,13 @@ jobs: name: LatestSource path: .\netreflected\source.zip retention-days: 1 - + + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + cache: 'maven' + - name: Build Java test source file .NET Core 3.1 run: javac -cp ./bin/netcoreapp3.1/JCOReflector.jar ./netreflected-tests/java/src/hierarchy/*.java ./netreflected-tests/java/src/mscorlib/*.java ./netreflected-tests/java/src/nettest/*.java ./netreflected-tests/java/src/refout/*.java diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index f0c6de6058c..8077af619d8 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -28,22 +28,22 @@ jobs: for added_modified_file in "${added_modified_files[@]}"; do if [[ $added_modified_file == ".github/workflows/windows.yaml"* ]]; then echo "$added_modified_file is under the directory '.github/workflows'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected/src/JCOReflector/"* ]]; then echo "$added_modified_file is under the directory 'netreflected/src/JCOReflector'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "src/"* ]]; then echo "$added_modified_file is under the directory 'src/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi if [[ $added_modified_file == "netreflected-tests/"* ]]; then echo "$added_modified_file is under the directory 'netreflected-tests/'." - echo "::set-output name=run_job::true" + echo "run_job=true" >> $GITHUB_OUTPUT break fi done @@ -67,7 +67,7 @@ jobs: run: git config --system core.longpaths true # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: '1' @@ -78,7 +78,7 @@ jobs: - name: Build JCOReflectorCLI run: dotnet build --no-incremental --configuration Release /p:Platform="Any CPU" src\JCOReflectorCLI.sln - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v1.1.1 with: nuget-version: '5.x' @@ -128,7 +128,13 @@ jobs: - name: Build JAR files .NET Framework run: .\bin\net462\MASES.JCOReflectorCLI -JobType CreateJars -JobFile .github\workflows\createjars_framework_win19.job -JDKFolder %JAVA_HOME_11_X64% shell: cmd - + + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '17' + cache: 'maven' + - name: Build Java test source file .NET Core 3.1 run: javac -cp ./bin/netcoreapp3.1/JCOReflector.jar ./netreflected-tests/java/src/hierarchy/*.java ./netreflected-tests/java/src/mscorlib/*.java ./netreflected-tests/java/src/nettest/*.java ./netreflected-tests/java/src/refout/*.java @@ -343,7 +349,7 @@ jobs: - name: Commit statistics changes if: ${{ github.repository_owner == 'masesgroup'}} #do not push any changes outside main repo - uses: EndBug/add-and-commit@v5 + uses: EndBug/add-and-commit@v9 with: author_name: github-actions author_email: 41898282+github-actions[bot]@users.noreply.github.com @@ -354,7 +360,7 @@ jobs: - name: Commit report changes if: ${{ github.repository_owner == 'masesgroup'}} #do not push any changes outside main repo - uses: EndBug/add-and-commit@v5 + uses: EndBug/add-and-commit@v9 with: author_name: github-actions author_email: 41898282+github-actions[bot]@users.noreply.github.com @@ -365,7 +371,7 @@ jobs: - name: Commit source changes if: ${{ github.repository_owner == 'masesgroup'}} #do not push any changes outside main repo - uses: EndBug/add-and-commit@v5 + uses: EndBug/add-and-commit@v9 with: author_name: github-actions author_email: 41898282+github-actions[bot]@users.noreply.github.com @@ -376,7 +382,7 @@ jobs: - name: Commit source changes if: ${{ github.repository_owner == 'masesgroup'}} #do not push any changes outside main repo - uses: EndBug/add-and-commit@v5 + uses: EndBug/add-and-commit@v9 with: author_name: github-actions author_email: 41898282+github-actions[bot]@users.noreply.github.com @@ -385,22 +391,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: NuGet path: .\bin\*nupkg - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: netcoreapp3.1 path: .\bin\netcoreapp3.1.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: net6.0 path: .\bin\net6.0.zip - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: net462 path: .\bin\net462.zip