-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (33 loc) · 1.02 KB
/
release.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
name: release
on:
push:
branches: [ master, integration ]
pull_request:
branches: [ master, integration ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gryphonshafer/GitHub-MD-Book@v3
with:
settings: .github/github-md-book.yml
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |-
set -x
assets=()
for asset in ./output/*
do
assets+=("-a" "$asset")
done
now=$( date '+%Y-%m-%d %H:%M:%S %Z' )
time=$( date '+%s' )
branch=$( echo ${GITHUB_REF} | cut -c12-100 )
[[ ${branch} == 'master' ]] && p="" || p="--prerelease"
echo $GITHUB_TOKEN
wget https://github.com/github/hub/releases/download/v2.14.2/hub-linux-amd64-2.14.2.tgz
tar xvfpz hub-linux-amd64-2.14.2.tgz
./hub-linux-amd64-2.14.2/bin/hub release create "${assets[@]}" $p -m "$now - $branch" "$time"