-
-
Notifications
You must be signed in to change notification settings - Fork 34
48 lines (43 loc) · 1.39 KB
/
release-beta.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
name: Pre-release
on:
push:
tags:
# only match pre release
# matches:
# v1.0.0alpha20230507
# v1.0.0-beta20230507
# v1.0.0-development-20230507
- "v*.*.[0-9]+-?[a-zA-Z]*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Replace version string
run: |
echo $GITHUB_REF_NAME
VERSION=$(echo $GITHUB_REF_NAME | sed 's/^v//')
echo $VERSION
echo
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
sed -i --regexp-extended --expression="s/[0-9]+\.[0-9]+\.[0-9a-z\_\-]+/$VERSION/" "etc/dbus-serialbattery/utils.py"
head -n 39 etc/dbus-serialbattery/utils.py | tail -n 3
- name: build release archive
run: |
find . -type f -name "*.py" -exec chmod +x {} \;
find . -type f -name "*.sh" -exec chmod +x {} \;
find . -type f -name "run" -exec chmod +x {} \;
tar -czvf venus-data.tar.gz \
--mode='a+rwX' \
--exclude __pycache__ \
--exclude bms/battery_template.py \
--exclude bms/revov.py \
--exclude bms/test_max17853.py \
etc/dbus-serialbattery/ \
rc/
- name: Release
uses: softprops/action-gh-release@v1
with:
files: venus-data.tar.gz
prerelease: true