Skip to content

Commit

Permalink
test another way of release
Browse files Browse the repository at this point in the history
  • Loading branch information
dguodev committed Jul 5, 2022
1 parent 7c0528c commit 4d87846
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/release2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
developmentVersion:
description: Post release development version
required: true
default: ""
jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -33,6 +34,11 @@ jobs:
- name: Update to development version
run: |
sed -i ':a;N;$!ba; s|<revision>.*<\/revision>|<revision>${{ github.event.inputs.developmentVersion }}<\/revision>|g' diameter/pom.xml
NextReleaseVersion=$(echo ${{ developmentVersion }} |sed 's/-Snapshot//g')
NextDevVersion=$(echo $NextReleaseVersion|awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')
sed -i '8s/.*/default: $NextReleaseVersion/' .github/workflows/release2.yml
sed -i '12s/.*/default: $NextDevVersion/' .github/workflows/release2.yml
git add .github/workflows/release.yml
git add diameter/pom.xml
git commit -m "release version ${{ github.event.inputs.developmentVersion }}"
git push
git push

0 comments on commit 4d87846

Please sign in to comment.