Skip to content

Commit b7a2003

Browse files
committed
feat: update pre release workflow
1 parent c898d04 commit b7a2003

1 file changed

Lines changed: 72 additions & 28 deletions

File tree

.github/workflows/pre-release.yml

Lines changed: 72 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "pre-release"
1+
name: pre-release
22

33
on:
44
push:
@@ -9,8 +9,8 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
pre-release-linux:
13-
name: "Pre Release Linux"
12+
build-linux:
13+
name: Build for Linux
1414
runs-on: "ubuntu-latest"
1515

1616
steps:
@@ -21,28 +21,35 @@ jobs:
2121
with:
2222
python-version: "3.11"
2323

24-
- name: "Update pip"
24+
- name: Set up Project
2525
run: |
2626
python -m pip install --upgrade pip
27-
sudo apt install protobuf-compiler
28-
29-
- name: "Setup project"
30-
run: bash setup.sh
27+
pip install -r requirements.txt
28+
curl -Lo seekers-api.zip https://github.com/seekers-dev/seekers-api/releases/download/prerelease/seekers-api.zip
29+
unzip seekers-api.zip
3130
32-
- name: "Deploy binaries"
33-
run: bash deploy.sh
31+
- name: Build Binaries
32+
run: |
33+
pip install cx_Freeze
34+
python setup.py build
35+
zip -r seekers-linux.zip ./build
3436
35-
- uses: "marvinpinto/action-automatic-releases@latest"
37+
- name: Deploy Artifact
38+
uses: actions/upload-artifact@v4.6.2
3639
with:
37-
repo_token: "${{ secrets.GITHUB_TOKEN }}"
38-
automatic_release_tag: "latest-linux"
39-
prerelease: true
40-
title: "Pre Release Linux"
41-
files: |
42-
*.zip
40+
# Artifact name
41+
name: build-linux # optional, default is artifact
42+
# A file, directory or wildcard pattern that describes what to upload
43+
path: result/*
44+
# The desired behavior if no files are found using the provided path.
45+
if-no-files-found: error # optional, default is warn
46+
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
47+
overwrite: true # optional, default is false
48+
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
49+
include-hidden-files: false # optional, default is false
4350

44-
pre-release-windows:
45-
name: "Pre Release Windows"
51+
build-windows:
52+
name: Build for Windows
4653
runs-on: "windows-latest"
4754

4855
steps:
@@ -53,21 +60,58 @@ jobs:
5360
with:
5461
python-version: "3.11"
5562

56-
- name: "Update pip"
63+
- name: Set up Project
5764
run: |
5865
python -m pip install --upgrade pip
66+
pip install -r requirements.txt
67+
curl -Lo seekers-api.zip https://github.com/seekers-dev/seekers-api/releases/download/prerelease/seekers-api.zip
68+
unzip seekers-api.zip
69+
70+
- name: Build Binaries
71+
run: |
72+
pip install cx_Freeze
73+
python setup.py build
74+
for /d %%a in (build\*) do (powershell Compress-Archive ".\%%a\*" "seekers-win32.zip")
5975
60-
- name: "Setup project"
61-
run: .\setup.bat
76+
- name: Deploy Artifact
77+
uses: actions/upload-artifact@v4.6.2
78+
with:
79+
# Artifact name
80+
name: build-windows # optional, default is artifact
81+
# A file, directory or wildcard pattern that describes what to upload
82+
path: seekers-linux.zip
83+
# The desired behavior if no files are found using the provided path.
84+
if-no-files-found: error # optional, default is warn
85+
# The level of compression for Zlib to be applied to the artifact archive. The value can range from 0 to 9: - 0: No compression - 1: Best speed - 6: Default compression (same as GNU Gzip) - 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
86+
overwrite: true # optional, default is false
87+
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
88+
include-hidden-files: false # optional, default is false
6289

63-
- name: "Deploy binaries"
64-
run: .\deploy.bat
90+
prerelease:
91+
name: Prerelease
92+
runs-on: "ubuntu-latest"
93+
steps:
94+
- name: Download Artifact
95+
uses: actions/download-artifact@v5
96+
with:
97+
# Name of the artifact to download.
98+
# If unspecified, all artifacts for the run are downloaded.
99+
# Optional.
100+
name: build-linux
101+
102+
- name: Download Artifact
103+
uses: actions/download-artifact@v5
104+
with:
105+
# Name of the artifact to download.
106+
# If unspecified, all artifacts for the run are downloaded.
107+
# Optional.
108+
name: build-windows
65109

66110
- uses: "marvinpinto/action-automatic-releases@latest"
67111
with:
68112
repo_token: "${{ secrets.GITHUB_TOKEN }}"
69-
automatic_release_tag: "latest-windows"
113+
automatic_release_tag: "prerelease"
70114
prerelease: true
71-
title: "Pre Release Windows"
72-
files: |
73-
*.zip
115+
title: "prerelease"
116+
files: *.zip
117+

0 commit comments

Comments
 (0)