From 7eef3de56ccd9152c5e64c540c6a346f5f8a43e6 Mon Sep 17 00:00:00 2001 From: Chad Wilson Date: Sat, 17 Aug 2024 20:19:25 +0800 Subject: [PATCH] Synchronise release automation with other plugins (#221) Signed-off-by: Chad Wilson --- ...deployment.yml => release-on-pr-merge.yml} | 31 ++++++------------- README.MD | 4 +-- 2 files changed, 12 insertions(+), 23 deletions(-) rename .github/workflows/{deployment.yml => release-on-pr-merge.yml} (75%) diff --git a/.github/workflows/deployment.yml b/.github/workflows/release-on-pr-merge.yml similarity index 75% rename from .github/workflows/deployment.yml rename to .github/workflows/release-on-pr-merge.yml index a558895..dd02c55 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/release-on-pr-merge.yml @@ -1,4 +1,4 @@ -name: Deploy +name: Release on PR Merge on: deployment @@ -26,43 +26,32 @@ jobs: - name: Build artifacts run: | ./run.sh package - - name: Set Version env + + - name: Release on github run: | - cd artifacts if [ -z "$version" ]; then - version=$(ls gauge-dotnet* | sed "s/\.[^\.]*$//" | sed "s/gauge-dotnet-//"); + version=$(cd artifacts && ls gauge-dotnet* | head -1 | sed "s/\.[^\.]*$//" | sed "s/gauge-dotnet-//" | sed "s/-[a-z]*\.[a-z0-9_]*$//"); fi echo "VERSION=$version" >> $GITHUB_ENV - - name: update - run: | - cd artifacts - artifacts=() - dir=`pwd` - for i in `ls`; do - artifacts+="$dir/$i " - done - cd .. - + echo "---------------------------" - echo "Updating release v$VERSION" + echo "Updating release v$version" echo "---------------------------" - - echo -e "Gauge Dotnet v$VERSION\n\n" > desc.txt + echo -e "Gauge Dotnet v$version\n\n" > desc.txt release_description=$(ruby -e "$(curl -sSfL https://github.com/getgauge/gauge/raw/master/build/create_release_text.rb)" getgauge gauge-dotnet) echo "$release_description" >> desc.txt - - gh release create "v$VERSION" -F ./desc.txt $artifacts + gh release create --title "Gauge DotNet v${version}" --notes-file ./desc.txt "v${version}" artifacts/* - name: 'deployment success' if: success() - uses: 'deliverybot/status@master' + uses: deliverybot/deployment-status@master with: state: 'success' token: '${{ secrets.GITHUB_TOKEN }}' - name: 'deployment failure' if: failure() - uses: 'deliverybot/status@master' + uses: deliverybot/deployment-status@master with: state: 'failure' token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/README.MD b/README.MD index 5699b49..a963394 100644 --- a/README.MD +++ b/README.MD @@ -37,7 +37,7 @@ gauge run specs #### Install specific version ``` -gauge install dotnet --version 0.5.7 +gauge install dotnet --version 0.5.8 ``` #### Offline installation @@ -45,7 +45,7 @@ gauge install dotnet --version 0.5.7 Download the plugin from [Releases](https://github.com/getgauge/gauge-dotnet/releases) ``` -gauge install dotnet --file gauge-dotnet-0.5.7.zip +gauge install dotnet --file gauge-dotnet-0.5.8.zip ``` #### Build from Source