-
Notifications
You must be signed in to change notification settings - Fork 656
58 lines (47 loc) · 1.79 KB
/
run-tqsdk.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
55
56
57
58
name: Deploy Release
on:
push:
branches:
- 'master'
jobs:
deploy:
strategy:
matrix:
python-version: [3.6.x]
python-arch: [x64]
env:
PYTHONIOENCODING: "utf-8"
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Format ci info on tag
if: startsWith(github.event.head_commit.message, 'Update Version')
run: |
echo "TAG_NAME=$(echo ${{ github.event.head_commit.message }} | cut -c15-)" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
- name: Add tag
if: startsWith(github.event.head_commit.message, 'Update Version')
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ env.TAG_NAME }}
create_annotated_tag: true
tag_prefix: ''
- name: Install ghr
if: startsWith(github.event.head_commit.message, 'Update Version')
env:
GHR_FORK: tcnksm/ghr
GHR_VERSION: 0.14.0
run: |
curl --silent -L https://github.com/${{env.GHR_FORK}}/releases/download/v${{env.GHR_VERSION}}/ghr_v${{env.GHR_VERSION}}_linux_amd64.tar.gz > ghr_v${{env.GHR_VERSION}}_linux_amd64.tar.gz
tar xvzf ghr_v${{env.GHR_VERSION}}_linux_amd64.tar.gz
mv ghr_v${{env.GHR_VERSION}}_linux_amd64/ghr /usr/local/bin/
rm -rf ghr_v${{env.GHR_VERSION}}_linux_amd64 ghr_v${{env.GHR_VERSION}}_linux_amd64.tar.gz
- name: Publish to github release
if: startsWith(github.event.head_commit.message, 'Update Version')
run: |
ghr -u shinny-yangyang -t ${{ secrets.GITHUB_USER_TOKEN }} ${{ env.TAG_NAME }}