Skip to content

Commit

Permalink
Merge pull request #147 from ayeshLK/main
Browse files Browse the repository at this point in the history
Introduce timestampted builds for main-branch
  • Loading branch information
ayeshLK authored Jun 28, 2024
2 parents 72009fd + 6ec64e6 commit 11ea85c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jobs:
with:
distribution: 'adopt'
java-version: 17
- name: Change to Timestamped Version
run: |
startTime=$(TZ="Asia/Kolkata" date +'%Y%m%d-%H%M00')
latestCommit=$(git log -n 1 --pretty=format:"%h")
VERSION=$((grep -w 'version' | cut -d= -f2) < gradle.properties | rev | cut --complement -d- -f1 | rev)
updatedVersion=$VERSION-$startTime-$latestCommit
echo $updatedVersion
sed -i "s/version=\(.*\)/version=$updatedVersion/g" gradle.properties
- name: Github Packages Publish
env:
publishUser: ${{ secrets.BALLERINA_BOT_USERNAME }}
Expand Down

0 comments on commit 11ea85c

Please sign in to comment.