-
Notifications
You must be signed in to change notification settings - Fork 61
113 lines (109 loc) · 3.38 KB
/
package.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
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
103
104
105
106
107
108
109
110
111
112
113
name: Package
on:
workflow_dispatch:
inputs:
version:
description: version tag
required: false
release:
types: [published]
jobs:
package-linux:
# needs: create-destroy-tests
runs-on: ubuntu-18.04
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python dependencies
run: |
pip install pipenv
pipenv install --deploy
source $(pipenv --venv)/bin/activate
- name: Package
run: |
if [ -z "$VERSION" ]; then export VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||'); fi
make build-binary
cd dist/opta
zip -r opta.zip ./*
- name: Upload Linux Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.ALL_GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/opta/opta.zip
asset_name: opta_linux.zip
asset_content_type: application/zip
package-centos:
# needs: create-destroy-tests
runs-on: ubuntu-18.04
env:
VERSION: ${{ github.event.inputs.version }}
container:
image: "centos:centos7"
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
yum install -y unzip make zip centos-release-scl
yum install -y rh-python38
- name: Install python dependencies
run: |
scl enable rh-python38 - << \EOF
pip3.8 install pipenv
pipenv install --deploy --dev
source $(pipenv --venv)/bin/activate
EOF
- name: Package
run: |
scl enable rh-python38 - << \EOF
if [ -z "$VERSION" ]; then export VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||'); fi
make build-binary
cd dist/opta
zip -r opta.zip ./*
EOF
- name: Upload CentOS Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.ALL_GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/opta/opta.zip
asset_name: opta_centos.zip
asset_content_type: application/zip
package-macos:
# needs: create-destroy-tests
runs-on: macos-10.15
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install python dependencies
run: |
pip install pipenv
pipenv install --deploy --dev
source $(pipenv --venv)/bin/activate
- name: Package
run: |
if [ -z "$VERSION" ]; then export VERSION=$(echo "$GITHUB_REF" | sed 's|refs/tags/v||'); fi
make build-binary
cd dist/opta
zip -r opta.zip ./*
- name: Upload Mac Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.ALL_GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: dist/opta/opta.zip
asset_name: opta_mac.zip
asset_content_type: application/zip