mirror of
https://github.com/Vale54321/schafkopf-bot.git
synced 2025-12-15 11:19:33 +01:00
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: Release new Version
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and Release
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20.x'
|
|
|
|
- name: Install Frontend dependencies
|
|
run: npm install
|
|
working-directory: Frontend
|
|
|
|
- name: Create .env file
|
|
run: echo "VITE_APP_WEBSOCKET_IP=localhost" > .env
|
|
working-directory: Frontend
|
|
|
|
- name: Build Frontend
|
|
run: npm run build
|
|
working-directory: Frontend
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
architecture: x64
|
|
|
|
- name: Set up Maven
|
|
uses: stCarolas/setup-maven@v5
|
|
with:
|
|
maven-version: 3.8.2
|
|
|
|
- name: Build Backend
|
|
run: mvn -B package --file pom.xml
|
|
working-directory: Backend
|
|
|
|
- name: Archive dist folder
|
|
# run: mv Backend/target/schafkopf-backend-build-jar-with-dependencies.jar schafkopf-bot.jar && zip -r dist.zip schafkopf-bot.jar
|
|
run: mv Backend/schafkopf-client/target/schafkopf-client-build-jar-with-dependencies.jar schafkopf-bot-client_${{ github.ref_name }}.jar && mv Backend/schafkopf-server/target/schafkopf-server-build-jar-with-dependencies.jar schafkopf-bot-server_${{ github.ref_name }}.jar
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: |
|
|
schafkopf-bot-client_${{ github.ref_name }}.jar
|
|
schafkopf-bot-server_${{ github.ref_name }}.jar
|
|
token: ${{ secrets.PAT }}
|
|
|