-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (49 loc) · 1.63 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: deploy
on: [deployment]
jobs:
deploy:
name: deploy json report
runs-on: macos-latest
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v1
- name: Setup go 1.17
uses: actions/setup-go@v5
with:
go-version: stable
- name: build
run: |
go run build/make.go --all-platforms
go run build/make.go --all-platforms --distro
- name: update
run: |
cd deploy
if [ -z "$version" ]; then
version=$(grep '"version"' ../plugin.json | sed 's/"version":[[:space:]]*"//' | sed 's/",//' | tr -d [:space:])
fi
artifacts=()
dir=`pwd`
for i in `ls *.zip`; do
artifacts+="$dir/$i "
done
cd ..
echo "---------------------------"
echo "Updating release v$version"
echo "---------------------------"
echo -e "JSON Report 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-contrib json-report)
echo "$release_description" >> desc.txt
gh release create "v$version" -F ./desc.txt $artifacts
- name: 'deployment success'
if: success()
uses: 'deliverybot/status@master'
with:
state: 'success'
token: '${{ secrets.GITHUB_TOKEN }}'
- name: 'deployment failure'
if: failure()
uses: 'deliverybot/status@master'
with:
state: 'failure'
token: '${{ secrets.GITHUB_TOKEN }}'