Merge pull request #5167 from praneesha/update-graphql-bbe-seo #3566
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
- stage | |
- ballerina-1.1.x | |
workflow_dispatch: | |
inputs: | |
skipTests: | |
description: 'Skip Tests during build' | |
required: false | |
default: 'false' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17.0.7' | |
- name: Get project version | |
id: project-version | |
run: | | |
SHORT_VERSION=$((grep -w "version" | cut -d= -f2 | cut -d- -f1) < gradle.properties) | |
DIST_VERSION=$((grep -w "version" | cut -d= -f2) < gradle.properties) | |
CODE_NAME=$((grep -w 'codeName' | cut -d= -f2) < gradle.properties) | |
RELEASE_VERSION=$DIST_VERSION-$CODE_NAME | |
echo "::set-output name=version::$RELEASE_VERSION" | |
echo "::set-output name=sversion::$SHORT_VERSION" | |
- name: Build Ballerina Distribution | |
if: ${{ github.event.inputs.skipTests == '' || github.event.inputs.skipTests == 'false' }} | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
devCentralToken: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} | |
githubAccessToken: ${{ secrets.GITHUB_TOKEN }} | |
ballerinaBotWorkflow: $ {{ secrets.BALLERINA_BOT_WORKFLOW }} | |
run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon --continue -x project-api-tests:test | |
- name: Build Ballerina Distribution Skip Tests | |
if: ${{ github.event.inputs.skipTests == 'true' }} | |
env: | |
packageUser: ${{ github.actor }} | |
packagePAT: ${{ secrets.GITHUB_TOKEN }} | |
devCentralToken: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} | |
githubAccessToken: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew clean build --stacktrace --scan --console=plain --no-daemon --continue -x test | |
- name: Archive Ballerina ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Ballerina ZIP | |
path: ballerina/build/distributions/ballerina-*-swan-lake.zip | |
- name: Archive Ballerina Short Name ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Ballerina Short Name ZIP | |
path: ballerina/build/distributions/ballerina-${{ steps.project-version.outputs.sversion }}.zip | |
- name: Archive Linux installer ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Linux installer ZIP | |
path: ballerina/build/distributions/ballerina-*-linux.zip | |
- name: Archive MacOS installer ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: MacOS installer ZIP | |
path: ballerina/build/distributions/ballerina-*-macos.zip | |
- name: Archive Windows Installer ZIP | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Windows Installer ZIP | |
path: ballerina/build/distributions/ballerina-*-windows.zip |