Skip to content

Commit

Permalink
Synchronise release automation with other plugins
Browse files Browse the repository at this point in the history
Signed-off-by: Chad Wilson <chadw@thoughtworks.com>
  • Loading branch information
chadlwilson committed Aug 17, 2024
1 parent 5e9f427 commit bfbca3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Release on PR Merge

on: deployment

Expand Down Expand Up @@ -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 }}'
Expand Down
4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ gauge run specs
#### Install specific version

```
gauge install dotnet --version 0.5.7
gauge install dotnet --version 0.5.8
```

#### Offline installation

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
Expand Down

0 comments on commit bfbca3f

Please sign in to comment.