-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.45 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build
on:
workflow_dispatch:
push:
branches:
- main
jobs:
ubuntu-build:
name: Build
runs-on: ubuntu-latest
steps:
- 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)
if [ -z "$BAL_VERSION" ]; then
BAL_VERSION="latest"
fi
echo "BAL_VERSION=$BAL_VERSION" >> $GITHUB_ENV
echo "Ballerina Version: $BAL_VERSION"
- name: Set Up Ballerina
uses: ballerina-platform/setup-ballerina@v1.1.0
with:
version: ${{ env.BAL_VERSION }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17.0.7
- name: Build the Package
env:
packageUser: ${{ github.actor }}
packagePAT: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew build -x test
./gradlew test
- name: Generate Codecov Report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}