diff --git a/.github/workflows/publish_release_bi.yml b/.github/workflows/publish_release_bi.yml index 3f5621f825..4dd139f24a 100644 --- a/.github/workflows/publish_release_bi.yml +++ b/.github/workflows/publish_release_bi.yml @@ -25,9 +25,31 @@ jobs: uses: actions/setup-node@v1 with: node-version: '10.22.1' + - name: Clone ballerina-dev-tools + run: git clone https://github.com/ballerina-platform/ballerina-dev-tools.git + - name: Build ballerina-dev-tools + id: build-dev-tools + env: + packageUser: ${{ github.actor }} + packagePAT: ${{ secrets.GITHUB_TOKEN }} + devCentralToken: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} + githubAccessToken: ${{ secrets.GITHUB_TOKEN }} + ballerinaBotWorkflow: $ {{ secrets.BALLERINA_BOT_WORKFLOW }} + TEST_MODE_ACTIVE: true + run: | + cd ballerina-dev-tools + VERSION=$((grep -w 'version' | cut -d= -f2 | cut -d- -f1) < gradle.properties) + sed -i "s/^version=.*/version=$VERSION/" gradle.properties + echo "::set-output name=version::$(grep "^version=" gradle.properties | cut -d'=' -f2)" + echo "::set-output name=langVersion::$(grep "^ballerinaLangVersion=" gradle.properties | cut -d'=' -f2)" + ./gradlew clean build --stacktrace --scan -x test --console=plain --no-daemon --continue publishToMavenLocal + cd .. + rm -rf ballerina-dev-tools - name: Set version env variable id: version-set run: | + sed -i "s/^devToolsVersion=.*/devToolsVersion=${{ steps.build-dev-tools.outputs.version }}/" gradle.properties + sed -i "s/^ballerinaLangVersion=.*/ballerinaLangVersion=${{ steps.build-dev-tools.outputs.langVersion }}/" gradle.properties SHORT_VERSION=$((grep -w 'version' | cut -d= -f2 | cut -d- -f1) < gradle.properties) DIST_VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev) LANG_VERSION=$((grep -w "ballerinaLangVersion" | cut -d= -f2 | cut -d- -f1 | xargs) < gradle.properties)