Skip to content

Commit bc13590

Browse files
committed
feat: aktualisiere Installer-URL mit Tag-Parameter und füge GitHub Actions Workflow für Release hinzu
1 parent 02e2671 commit bc13590

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: On Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
append-assets:
9+
name: Append Assets to Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Python (or any required setup)
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x' # Specify the Python version you need
20+
cache: 'pip'
21+
cache-dependency-path: requirements.txt
22+
- name: Install Dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Run build step (example)
28+
run: |
29+
pyinstaller --onefile installer.py ${{ github.event.release.tag_name }}
30+
31+
- name: Upload Asset to Release
32+
uses: softprops/action-gh-release@v1
33+
with:
34+
tag_name: ${{ github.event.release.tag_name }}
35+
files: |
36+
dist/installer
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

installer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import requests
66
import stat
77
import platform
8+
import sys
89

910
# === CONFIGURATION ===
10-
ZIP_URL = "https://github.com/StoppedwummPython/minecraft-launcher/archive/main.zip"
1111
TARGET_DIR = os.path.expanduser("~/Documents/mc")
12+
TAG = sys.argv[1] if len(sys.argv) > 1 else "1.1.0"
13+
ZIP_URL = "https://github.com/StoppedwummPython/minecraft-launcher/archive/refs/tags/" + TAG + ".zip"
1214

1315
def download_zip(url, dest_path):
1416
print(f"Downloading from {url}...")

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
requests
2+
pyinstaller

0 commit comments

Comments
 (0)