Files
schafkopf-bot/.github/workflows/relaseNewVersion.yml

64 lines
1.5 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/target/schafkopf-backend-build-jar-with-dependencies.jar schafkopf-bot.jar
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: schafkopf-bot.jar
token: ${{ secrets.PAT }}