Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Merge 9129ed2 into acfc0b6
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Jan 18, 2022
2 parents acfc0b6 + 9129ed2 commit 3bfa8a9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
declare -i newpost
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
latestpre=$(echo "$latest" | awk '{split($0,a,"."); print a[1] "." a[2]}')
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
newpost=$latestpost+1
datepre=$(date --utc '+%y.%-W')
if [[ "$latestpre" == "$datepre" ]]; then
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
newpost=$latestpost+1
else
newpost=0
fi
echo Current version: $latest
echo New target version: $latestpre.$newpost
echo "::set-output name=version::$latestpre.$newpost"
echo New target version: $datepre.$newpost
echo "::set-output name=version::$datepre.$newpost"
- name: 🏃 Run Release Drafter
uses: release-drafter/release-drafter@v5
Expand Down

0 comments on commit 3bfa8a9

Please sign in to comment.