-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (50 loc) · 1.61 KB
/
build-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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Build (Beta Ver.)'
on:
push:
branches:
- master
jobs:
build:
runs-on: [self-hosted, linux, x64]
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Setting up Python
uses: actions/setup-python@v4
with:
python-version: '3.10.13'
cache: 'pip'
cache-dependency-path: |
requirements.txt
- name: Update Pip and Install Requirements
run: |
pip install -U pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build on Linux
run: |
pyinstaller --onefile --icon=onedisc.ico
- name: Get version number
run: |
export VERSION=$(python -c 'print(__import__("version").VERSION)')
export SUB_VER=$(git rev-list --no-merges --count $(git describe --tags --abbrev=0)..HEAD)
echo "VERSION=$VERSION.$SUB_VER" >> GITHUB_ENV
echo "Currect Version Number: $VERSION.$SUB_VER"
- name: Compress file
run: |
sudo apt update
sudo apt install zip -y
cd dist
mv main onedisc
zip -r "../../OneDisc-linux-x86_64-dev.zip" onedisc
cd ../..
git clone https://github.com/ITCraftDevelopmentTeam/OneDisc-Homepage.git
cd OneDisc-Homepage/docs/public
mkdir downloads --parents
cd downloads
mv ../../../../OneDisc-linux-x86_64-dev.zip .
git add -A
git commit -m "Update version to $VERSION"
git push
env:
VERSION: ${{ env.VERSION }}