Merge pull request 'main' (#13) from main into Release
Some checks failed
Build and Release Minecraft Plugin / build (push) Failing after 52s
Build and Release Minecraft Plugin / release (push) Has been skipped

Reviewed-on: #13
This commit is contained in:
Steev 2023-10-03 19:31:07 +02:00
commit 3f33d2efc2

View File

@ -17,16 +17,17 @@ jobs:
java-version: '17'
distribution: 'adopt' # Verwenden Sie 'adopt' für Java 17
- name: add maven repo
run: apt-add-repository ppa:andrei-pozolotin/maven3
- name: Update Apt
run: apt update -y
- name: Update CA certificates
run: apt-get install --reinstall ca-certificates
- name: Install Maven
run: |
wget -q https://downloads.apache.org/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz
tar xf apache-maven-3.8.4-bin.tar.gz
export M2_HOME=$PWD/apache-maven-3.8.4
export PATH=$M2_HOME/bin:$PATH
rm apache-maven-3.8.4-bin.tar.gz
run: apt install maven -y
- name: Build with Maven
run: mvn clean install
@ -44,13 +45,28 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Get letzte Release-Version
id: get_version
run: echo "::set-output name=version::$(git describe --tags --abbrev=0 || echo '0.0.0')"
- name: Incrementiere Version
id: increment_version
run: |
IFS='.' read -ra VERSION <<< "${{ steps.get_version.outputs.version }}"
MAJOR="${VERSION[0]}"
MINOR="${VERSION[1]}"
PATCH="${VERSION[2]}"
echo "::set-output name=major::$(($MAJOR + 1))"
echo "::set-output name=minor::$(($MINOR + 1))"
echo "::set-output name=patch::$(($PATCH + 1))"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
target/BetterMinecraft.jar
tag_name: ${{ gitea.ref }}
title: Release ${{ gitea.ref }}
tag_name: ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
release_name: Release ${{ steps.increment_version.outputs.major }}.${{ steps.increment_version.outputs.minor }}.${{ steps.increment_version.outputs.patch }}
draft: false
prerelease: false