Skip to content

Commit

Permalink
Upddate Kola release workflow to run on schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
NipunaMadhushan committed Oct 30, 2024
1 parent 374bef7 commit dd1c30f
Showing 1 changed file with 5 additions and 18 deletions.
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

0 comments on commit dd1c30f

Please sign in to comment.