forked from MatthiasHu/seekers
-
Notifications
You must be signed in to change notification settings - Fork 1
119 lines (101 loc) · 4.5 KB
/
Copy pathpre-release.yml
File metadata and controls
119 lines (101 loc) · 4.5 KB
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
114
115
116
117
118
name: pre-release
on:
push:
branches:
- "master"
permissions:
contents: write
jobs:
build-linux:
name: Build for Linux
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v5.0.0
- name: Set up Python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.11"
- name: Set up Project
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
curl -Lo seekers-api.zip https://github.com/seekers-dev/seekers-api/releases/download/prerelease/seekers-api.zip
unzip seekers-api.zip
- name: Build Binaries
run: |
pip install cx_Freeze
python setup.py build
zip -r seekers-linux.zip ./build
- name: Deploy Artifact
uses: actions/upload-artifact@v4.6.2
with:
# Artifact name
name: build-linux # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: seekers-linux.zip
# The desired behavior if no files are found using the provided path.
if-no-files-found: error # optional, default is warn
# 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.
overwrite: true # optional, default is false
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
include-hidden-files: false # optional, default is false
build-windows:
name: Build for Windows
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v5.0.0
- name: Set up Python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.11"
- name: Set up Project
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
curl -Lo seekers-api.zip https://github.com/seekers-dev/seekers-api/releases/download/prerelease/seekers-api.zip
unzip seekers-api.zip
- name: Build Binaries
run: |
pip install cx_Freeze
python setup.py build
powershell Compress-Archive -Path "build\*" -DestinationPath "seekers-win32.zip"
- name: Deploy Artifact
uses: actions/upload-artifact@v4.6.2
with:
# Artifact name
name: build-windows # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: seekers-win32.zip
# The desired behavior if no files are found using the provided path.
if-no-files-found: error # optional, default is warn
# 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.
overwrite: true # optional, default is false
# If true, hidden files will be included in the artifact. If false, hidden files will be excluded from the artifact.
include-hidden-files: false # optional, default is false
prerelease:
name: Prerelease
runs-on: "ubuntu-latest"
needs: [ "build-linux", "build-windows" ]
steps:
- name: Download Artifact
uses: actions/download-artifact@v5
with:
# Name of the artifact to download.
# If unspecified, all artifacts for the run are downloaded.
# Optional.
name: build-linux
- name: Download Artifact
uses: actions/download-artifact@v5
with:
# Name of the artifact to download.
# If unspecified, all artifacts for the run are downloaded.
# Optional.
name: build-windows
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "prerelease"
prerelease: true
title: "prerelease"
files: |
*.zip