-
-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (83 loc) · 3.09 KB
/
release_artifacts.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
name: Build Release Artifacts
on:
release:
types: [published]
jobs:
artifacts:
name: Package & upload release artifacts
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build base bundle
run: |
tar -cvf bundle_base.tar \
./boot.py \
./code.py \
./secrets.py \
./skyportal_config.py
- name: Build PyPortal bundle base
run: |
mkdir -p ./tmp/assets
cp ./assets/* ./tmp/assets
cp ./tmp/assets/default_map_pyportal.bmp ./tmp/assets/default_map.bmp
rm ./tmp/assets/default_map_*.bmp
mkdir -p ./tmp/lib
cp -r ./lib_by_platform/pyportal/lib/* ./tmp/lib
cp ./pyportal_startup.bmp .
cp ./pyportal_startup.wav .
cp bundle_base.tar pyportal_bundle_base.tar
tar -rvf pyportal_bundle_base.tar -C ./tmp/ .
- name: Create non-compiled PyPortal bundle
run: |
cp pyportal_bundle_base.tar skyportal_bundle_pyportal.tar
tar -rvf skyportal_bundle_pyportal.tar ./skyportal/*
tar -vf skyportal_bundle_pyportal.tar --delete ./skyportal/feather_compat.py
gzip skyportal_bundle_pyportal.tar
- name: Compile skyportal lib for PyPortal
run: |
python ./compile.py pyportal
- name: Create compiled PyPortal bundle
run: |
cp pyportal_bundle_base.tar skyportal_bundle_pyportal_compiled.tar
tar -rvf skyportal_bundle_pyportal_compiled.tar -C ./dist/ .
gzip skyportal_bundle_pyportal_compiled.tar
- name: PyPortal Cleanup
run: |
rm -rf ./tmp
rm -rf ./dist
rm -f pyportal_bundle_base.tar
- name: Build Feather bundle base
run: |
mkdir -p ./tmp/assets
cp ./assets/* ./tmp/assets
cp ./tmp/assets/default_map_featherS3.bmp ./tmp/assets/default_map.bmp
rm ./tmp/assets/default_map_*.bmp
mkdir -p ./tmp/lib
cp -r ./lib_by_platform/featherS3/lib/* ./tmp/lib
cp bundle_base.tar feather_bundle_base.tar
tar -rvf feather_bundle_base.tar -C ./tmp/ .
- name: Create non-compiled FeatherS3 bundle
run: |
cp feather_bundle_base.tar skyportal_bundle_feather.tar
tar -rvf skyportal_bundle_feather.tar ./skyportal/*
tar -vf skyportal_bundle_feather.tar --delete ./skyportal/pyportal_compat.py
gzip skyportal_bundle_feather.tar
- name: Compile skyportal lib for FeatherS3
run: |
python ./compile.py feather
- name: Create compiled FeatherS3 bundle
run: |
cp feather_bundle_base.tar skyportal_bundle_feather_compiled.tar
tar -rvf skyportal_bundle_feather_compiled.tar -C ./dist/ .
gzip skyportal_bundle_feather_compiled.tar
- name: Upload artifacts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release upload ${{ github.event.release.tag_name }} skyportal_bundle_*.tar.gz