Release v1.0.0: Versionsnummer implementiert, Nightly zu Stable gemergt

This commit is contained in:
vibe-bot 2025-08-09 15:53:51 +02:00
parent cf29937813
commit 73eada8fd9
7 changed files with 46 additions and 12 deletions

View file

@ -24,15 +24,19 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate Docker tag
- name: Generate Docker tag and version
id: docker_tag
run: |
if [[ "${{ github.ref_name }}" == "main" ]]; then
echo "tag=main" >> $GITHUB_OUTPUT
echo "version=1.0.0" >> $GITHUB_OUTPUT
echo "channel=stable" >> $GITHUB_OUTPUT
else
# Ersetze Slashes durch Bindestriche für gültige Docker Tags
CLEAN_TAG=$(echo "${{ github.ref_name }}" | sed 's/\//-/g')
echo "tag=$CLEAN_TAG" >> $GITHUB_OUTPUT
echo "version=1.0.0-nightly" >> $GITHUB_OUTPUT
echo "channel=nightly" >> $GITHUB_OUTPUT
fi
- name: Build and push
@ -41,7 +45,8 @@ jobs:
context: .
push: true
build-args: |
VITE_BUILD_CHANNEL=${{ steps.docker_tag.outputs.tag == 'main' && 'stable' || 'nightly' }}
VITE_BUILD_CHANNEL=${{ steps.docker_tag.outputs.channel }}
VITE_APP_VERSION=${{ steps.docker_tag.outputs.version }}
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ github.sha }}

View file

@ -8,7 +8,9 @@ RUN npm install --no-audit --no-fund
COPY web/ .
# Umgebungsvariable für React Build verfügbar machen (Vite liest nur VITE_*)
ARG VITE_BUILD_CHANNEL=stable
ARG VITE_APP_VERSION=1.0.0
ENV VITE_BUILD_CHANNEL=$VITE_BUILD_CHANNEL
ENV VITE_APP_VERSION=$VITE_APP_VERSION
RUN npm run build
# --- Build server (npm) ---

View file

@ -1,8 +1,8 @@
# 🎵 Jukebox 420 - Discord Soundboard
# 🎵 Jukebox 420 - Discord Soundboard v1.0.0
Ein modernes, feature-reiches Discord Soundboard mit Web-Frontend, Discord-Bot und Docker-Deployment. Perfekt für Gaming-Communities, Streamer und Discord-Server.
![Version](https://img.shields.io/badge/version-2.0-blue)
![Version](https://img.shields.io/badge/version-1.0.0-blue)
![Docker](https://img.shields.io/badge/docker-ready-green)
![Discord](https://img.shields.io/badge/discord-bot-purple)

View file

@ -12,7 +12,8 @@ services:
- CLIENT_ID=${CLIENT_ID}
- GUILD_ID=${GUILD_ID}
- ADMIN_PWD=${ADMIN_PWD}
- REACT_APP_VERSION=nightly
- VITE_BUILD_CHANNEL=nightly
- VITE_APP_VERSION=1.0.0-nightly
volumes:
- ./data/sounds:/data/sounds
- ./data/uploads:/data/uploads

View file

@ -7,7 +7,8 @@ services:
env_file:
- .env
environment:
- REACT_APP_VERSION=stable
- VITE_BUILD_CHANNEL=stable
- VITE_APP_VERSION=1.0.0
volumes:
- ./data/sounds:/data/sounds
restart: unless-stopped

22
package.json Normal file
View file

@ -0,0 +1,22 @@
{
"name": "jukebox-vibe",
"version": "1.0.0",
"description": "Discord Soundboard mit Web-Interface",
"private": true,
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@vitejs/plugin-react": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^4.0.0"
}
}

View file

@ -252,12 +252,15 @@ export default function App() {
<header className="flex items-center justify-between p-6">
<div className="flex items-center">
<div>
<h1 className="text-4xl font-bold">
Jukebox 420
{import.meta.env.VITE_BUILD_CHANNEL === 'nightly' && (
<span className="text-sm font-semibold ml-2" style={{ color: '#ff4d4f' }}>Nightly Build</span>
)}
</h1>
<h1 className="text-4xl font-bold">
Jukebox 420
<div className="text-sm font-normal mt-1 opacity-70">
v{import.meta.env.VITE_APP_VERSION || '1.0.0'}
{import.meta.env.VITE_BUILD_CHANNEL === 'nightly' && (
<span className="ml-2" style={{ color: '#ff4d4f' }}> Nightly</span>
)}
</div>
</h1>
<p className="text-7xl font-bold mt-2">{clock}</p>
</div>
</div>