Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-timestamp-master-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
48 changes: 25 additions & 23 deletions .github/workflows/pr-build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ on:
required: false
type: string
default: ""



jobs:
ubuntu-build:
name: Build
Expand All @@ -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
Expand All @@ -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 }}
13 changes: 7 additions & 6 deletions .github/workflows/pull-request-build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/s4hana-build-connector-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 }}
11 changes: 7 additions & 4 deletions .github/workflows/s4hana-pr-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down