From 4d878460fe5901dbecf0bcae4914fa887e0edf67 Mon Sep 17 00:00:00 2001 From: dguodev Date: Tue, 5 Jul 2022 11:25:12 -0400 Subject: [PATCH] test another way of release --- .github/workflows/release2.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release2.yml b/.github/workflows/release2.yml index 57fe15a..ece8c47 100644 --- a/.github/workflows/release2.yml +++ b/.github/workflows/release2.yml @@ -9,6 +9,7 @@ on: developmentVersion: description: Post release development version required: true + default: "" jobs: release: runs-on: ubuntu-latest @@ -33,6 +34,11 @@ jobs: - name: Update to development version run: | sed -i ':a;N;$!ba; s|.*<\/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 \ No newline at end of file + git push