diff --git a/.github/workflows/build-connector-template.yml b/.github/workflows/build-connector-template.yml index fad1631d..5633d9bc 100644 --- a/.github/workflows/build-connector-template.yml +++ b/.github/workflows/build-connector-template.yml @@ -33,7 +33,7 @@ jobs: - name: Get Ballerina Version run: | - BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) + BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) if [ -z "$BAL_VERSION" ]; then BAL_VERSION="latest" fi @@ -60,10 +60,10 @@ jobs: updatedVersion=$VERSION-$startTime-$latestCommit echo $updatedVersion sed -i "s/version=\(.*\)/version=$updatedVersion/g" gradle.properties - + - name: Set ENV Variables run: | - echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV + echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV - name: Build the Package env: @@ -73,8 +73,11 @@ jobs: ./gradlew build -x test ${{ inputs.additional-build-flags }} ./gradlew test ${{ inputs.additional-test-flags }} - - name: Generate Codecov Report - uses: codecov/codecov-action@v3 + - name: Generate CodeCov Report + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} - name: Publish Connector if: ${{ inputs.publish-required == true }} diff --git a/.github/workflows/build-timestamp-master-template.yml b/.github/workflows/build-timestamp-master-template.yml index f282bd5e..c7674ec7 100644 --- a/.github/workflows/build-timestamp-master-template.yml +++ b/.github/workflows/build-timestamp-master-template.yml @@ -36,7 +36,7 @@ jobs: - name: Set ENV Variables run: | - echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV + echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV - name: Build with Gradle env: @@ -47,7 +47,10 @@ jobs: run: ./gradlew publish --no-daemon --scan ${{ inputs.additional-build-flags }} - name: Generate CodeCov Report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} - name: Upload Artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/pr-build-connector-template.yml b/.github/workflows/pr-build-connector-template.yml index 16240327..6456bc93 100644 --- a/.github/workflows/pr-build-connector-template.yml +++ b/.github/workflows/pr-build-connector-template.yml @@ -11,8 +11,7 @@ on: required: false type: string default: "" - - + jobs: ubuntu-build: name: Build @@ -21,12 +20,12 @@ jobs: group: ${{ github.head_ref }}-ubuntu-build cancel-in-progress: true steps: - - name: Checkout Repository - uses: actions/checkout@v3 + - name: Checkout Repository + uses: actions/checkout@v3 - name: Get Ballerina Version run: | - BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) + BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) if [ -z "$BAL_VERSION" ]; then BAL_VERSION="latest" fi @@ -38,23 +37,26 @@ jobs: with: version: ${{ env.BAL_VERSION }} - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - distribution: 'temurin' - java-version: 21.0.3 - - - name: Set ENV Variables - run: | - echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 21.0.3 - - name: Build the Package - env: - packageUser: ${{ github.actor }} - packagePAT: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew build -x test ${{ inputs.additional-build-flags }} - ./gradlew test ${{ inputs.additional-test-flags }} + - name: Set ENV Variables + run: | + echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV - - name: Generate Codecov Report - uses: codecov/codecov-action@v3 + - name: Build the Package + env: + packageUser: ${{ github.actor }} + packagePAT: ${{ secrets.GITHUB_TOKEN }} + run: | + ./gradlew build -x test ${{ inputs.additional-build-flags }} + ./gradlew test ${{ inputs.additional-test-flags }} + + - name: Generate CodeCov Report + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} diff --git a/.github/workflows/pull-request-build-template.yml b/.github/workflows/pull-request-build-template.yml index 66dab26d..35c5bfc3 100644 --- a/.github/workflows/pull-request-build-template.yml +++ b/.github/workflows/pull-request-build-template.yml @@ -42,7 +42,7 @@ jobs: - name: Set ENV Variables run: | - echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV + echo -e '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' >> $GITHUB_ENV - name: Build the Package env: @@ -52,10 +52,11 @@ jobs: ./gradlew build -x test ${{ inputs.additional-ubuntu-build-flags }} ./gradlew test ${{ inputs.additional-ubuntu-test-flags }} - - name: Generate Codecov Report - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} + - name: Generate CodeCov Report + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} windows-build: name: Build on Windows @@ -75,7 +76,7 @@ jobs: - name: Set ENV Variables run: | - echo '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' | Out-File -FilePath $env:GITHUB_ENV -Append + echo '${{ toJson(secrets) }}' | jq -r 'to_entries[] | .key + "=" + .value' | Out-File -FilePath $env:GITHUB_ENV -Append - name: Build the Project env: diff --git a/.github/workflows/s4hana-build-connector-template.yml b/.github/workflows/s4hana-build-connector-template.yml index f1ea0443..44b7ad4d 100644 --- a/.github/workflows/s4hana-build-connector-template.yml +++ b/.github/workflows/s4hana-build-connector-template.yml @@ -17,7 +17,7 @@ jobs: - name: Get Ballerina Version run: | - BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) + BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) if [ -z "$BAL_VERSION" ]; then BAL_VERSION="latest" fi @@ -59,7 +59,7 @@ jobs: if [[ "$dir" == resources ]]; then continue fi - folders+=("$dir"); + folders+=("$dir"); done echo "directories=$(jq -nc --args '$ARGS.positional' ${folders[@]})" >> $GITHUB_OUTPUT @@ -102,5 +102,8 @@ jobs: - name: Download coverage reports uses: actions/download-artifact@v4 - - name: Generate Codecov Report - uses: codecov/codecov-action@v3 + - name: Generate CodeCov Report + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} diff --git a/.github/workflows/s4hana-pr-template.yml b/.github/workflows/s4hana-pr-template.yml index c2c7e10b..894af9cd 100644 --- a/.github/workflows/s4hana-pr-template.yml +++ b/.github/workflows/s4hana-pr-template.yml @@ -25,7 +25,7 @@ jobs: if [[ "$dir" == resources ]]; then continue fi - folders+=("$dir"); + folders+=("$dir"); done echo "directories=$(jq -nc --args '$ARGS.positional' ${folders[@]})" >> $GITHUB_OUTPUT @@ -68,8 +68,11 @@ jobs: - name: Download coverage reports uses: actions/download-artifact@v4 - - name: Generate Codecov Report - uses: codecov/codecov-action@v3 + - name: Generate CodeCov Report + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: ballerina-platform/${{ github.event.inputs.repo }} build-examples: name: Build Examples @@ -81,7 +84,7 @@ jobs: - name: Get Ballerina Version run: | - BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) + BAL_VERSION=$(grep -w 'ballerinaLangVersion' gradle.properties | cut -d= -f2 | rev | cut --complement -d- -f1 | rev) if [ -z "$BAL_VERSION" ]; then BAL_VERSION="latest" fi