-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (102 loc) · 3.1 KB
/
release_packages.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Release packages
on:
workflow_dispatch:
inputs:
loopchain:
description: 'loopchain tag'
required: true
default: '2.7.7'
iconrpcserver:
description: 'iconrpcserver tag'
required: true
default: '1.6.0'
iconservice:
description: 'iconservice tag'
required: true
default: '1.8.2'
rewardcalculator:
description: 'rewardcalculator tag'
required: true
default: '1.2.5'
release_tag:
description: 'github release tag'
required: true
default: '2020.11.12'
jobs:
release:
runs-on: ubuntu-latest
# FIXME
strategy:
matrix:
python-version: [3.7]
env:
BUILD_DIR: build
ASSETS_DIR: assets
PACKAGE_INFO: package_info.txt
RELEASE_TAG: ${{ github.event.inputs.release_tag }}
DEBUG: ${{ true }}
steps:
- name: Checkout release
uses: actions/checkout@v2
- name: checkout loopchain
uses: actions/checkout@v2
with:
repository: icon-project/loopchain
ref: ${{ github.event.inputs.loopchain }}
path: loopchain
- name: Checkout iconrpcserver
uses: actions/checkout@v2
with:
repository: icon-project/icon-rpc-server
ref: ${{ github.event.inputs.iconrpcserver }}
path: icon-rpc-server
- name: Checkout iconservice
uses: actions/checkout@v2
with:
repository: icon-project/icon-service
ref: ${{ github.event.inputs.iconservice }}
path: icon-service
- name: Checkout reward calculator
uses: actions/checkout@v2
with:
repository: icon-project/rewardcalculator
ref: ${{ github.event.inputs.rewardcalculator }}
path: rewardcalculator
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Workflow check
if : ${{ env.DEBUG }}
run: |
echo $PWD
ls -al
- name: Build packages
run: |
python -m pip install --upgrade pip pytz wheel
mkdir -p $BUILD_DIR $ASSETS_DIR
make
- name: Build assets
run: |
make assets RELEASE_TAG=$RELEASE_TAG
python -c "import asset; print(asset.package_info('$BUILD_DIR/$PACKAGE_INFO'))" >> $GITHUB_ENV
- name: Check build result
if: ${{ env.DEBUG }}
run: |
echo "github release tag: $RELEASE_TAG"
ls -al ./$BUILD_DIR
ls -al ./$ASSETS_DIR
echo "-------"
echo "${{ env.PACKAGE_INFO_BODY }}"
- name: Upload release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.RELEASE_SECRET }}
tag: ${{ env.RELEASE_TAG }}
file: ${{ format('{0}/*', env.ASSETS_DIR) }}
file_glob: true
release_name: Release ${{ env.RELEASE_TAG }}
# prerelease: true
overwrite: true
body: |
${{ env.PACKAGE_INFO_BODY }}