Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upddate Kola release workflow to run on schedule #5807

Merged
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
23 changes: 5 additions & 18 deletions .github/workflows/publish_release_bi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ name: Publish Release Kola Distribution

on:
workflow_dispatch:
inputs:
isPreRelease:
description: 'Tag created is a pre-release tag'
required: true
default: 'false'
preReleaseSuffix:
description: 'The text that will be suffixed to the Git tag. e.g., rc1'
required: false
default: ''
schedule:
- cron: '0 2 * * *' # 07:30 in LK time (GMT+5:30)

permissions:
id-token: write
Expand Down Expand Up @@ -62,11 +55,8 @@ jobs:
LANG_VERSION=$((grep -w "ballerinaLangVersion" | cut -d= -f2 | cut -d- -f1 | xargs) < gradle.properties)
CODE_NAME=$((grep -w 'codeName' | cut -d= -f2) < gradle.properties)
RELEASE_VERSION=$DIST_VERSION
TAGGED_VERSION=$RELEASE_VERSION
TAGGED_VERSION=$RELEASE_VERSION-$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00')
LONG_VERSION=$DIST_VERSION-$CODE_NAME
if [ -n "${{ github.event.inputs.preReleaseSuffix }}" ]; then
TAGGED_VERSION=$RELEASE_VERSION-${{ github.event.inputs.preReleaseSuffix }}
fi
echo VERSION=$RELEASE_VERSION >> $GITHUB_ENV
echo GIT_TAG=$TAGGED_VERSION >> $GITHUB_ENV
echo "::set-output name=version::$RELEASE_VERSION"
Expand Down Expand Up @@ -163,10 +153,7 @@ jobs:
branchName=$(echo ${{ github.ref }} | cut -d'/' -f3)
echo "::set-output name=branchName::$branchName"
- name: Update Markdown file
run: |
if ${{ github.event.inputs.isPreRelease }} == 'true'; then
echo "" > release_notes.md;
else sed -i 's/{{ version }}/${{ steps.version-set.outputs.taggedVersion }}/g' release_notes.md; sed -i 's/{{ branch }}/${{ steps.retrieve-branch.outputs.branchName }}/g' release_notes.md; fi
run: echo "" > release_notes.md;
- name: Read release notes from file
id: release_notes
uses: actions/github-script@v4
Expand All @@ -186,7 +173,7 @@ jobs:
release_name: ${{ steps.version-set.outputs.taggedVersion }}
body: ${{ steps.release_notes.outputs.notes }}
draft: false
prerelease: ${{ github.event.inputs.isPreRelease }}
prerelease: true
- name: Create linux-deb Installer
run: |
cd installers/linux-deb
Expand Down
Loading