-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/MineValley/Core-API into ne…
…w-chars
- Loading branch information
Showing
5 changed files
with
122 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,53 @@ | ||
name: Core-API | Maven-deployer | ||
|
||
# This workflow is used to deploy a new maven-build of this api, whenever a new release is created. | ||
# Always make sure to delete the latest package before creating a new release! | ||
name: Core-API | Build and deploy | ||
|
||
on: | ||
release: # Triggers this workflow whenever a new release is created. | ||
types: [published] | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'The version of the new build.' | ||
required: true | ||
type: string | ||
isRelease: | ||
description: 'Is this a release build?' | ||
required: true | ||
type: boolean | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it. | ||
- name: Repository-Checkout | ||
uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Sets the current Java-version to 1.8. | ||
- name: Set up to JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 1.8.0 | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
java-version: 8 | ||
|
||
# Deploys a maven-build as a new package to be accessed with any pom.xml. | ||
- name: Deploy to GitHub | ||
run: | | ||
mvn source:jar | ||
mvn deploy | ||
- name: Set Project Version | ||
run: mvn versions:set -DnewVersion=${{ inputs.version }} | ||
|
||
- name: Build with Maven | ||
run: mvn -B clean package | ||
|
||
- name: Deploy to GitHub Packages # Repository is set in pom.xml | ||
run: mvn deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload assets to release | ||
if: ${{ inputs.isRelease }} | ||
uses: softprops/[email protected] | ||
with: | ||
files: | | ||
target/api-${{ inputs.version }}.jar | ||
target/api-${{ inputs.version }}-sources.jar | ||
target/api-${{ inputs.version }}-javadoc.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Core-API | Nightly Builder | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
get-latest-version: | ||
name: Get latest version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version-ready.outputs.release }} | ||
steps: | ||
- name: Get latest release version | ||
if: github.event_name == 'push' | ||
id: get-latest-version | ||
uses: pozetroninc/[email protected] | ||
with: | ||
repository: ${{ github.repository }} | ||
|
||
- name: Increment version | ||
if: github.event_name == 'push' | ||
id: increment-version | ||
run: | | ||
RELEASE_NAME=${{ steps.get-latest-version.outputs.release }} | ||
echo "release=$(echo ${RELEASE_NAME#v} | awk -F. -v OFS=. '{$NF = $NF + 1;} 1')" >> "$GITHUB_OUTPUT" | ||
- name: Set output | ||
id: version-ready | ||
|
||
run: | | ||
if [[ "${{ github.ref_name}}" == "main" || "${{ github.ref_name }}" == "master" ]]; then | ||
echo "release=${{ steps.increment-version.outputs.release }}" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "release=${{ github.ref_name }}_${{ steps.increment-version.outputs.release }}" >> "$GITHUB_OUTPUT" | ||
fi | ||
build-nightly: | ||
name: Build Nightly version | ||
needs: get-latest-version | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
version: ${{ needs.get-latest-version.outputs.version }}-SNAPSHOT | ||
isRelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Core-API | Release Builder | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
get-version: | ||
name: Get Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
steps: | ||
- name: Get Version | ||
id: get-version | ||
run: | | ||
TAG_NAME=${{ github.event.release.tag_name }} | ||
echo "version=${TAG_NAME#v}" >> "$GITHUB_OUTPUT" | ||
build-release: | ||
name: Build Release | ||
needs: get-version | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
version: ${{ needs.get-version.outputs.version }} | ||
isRelease: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,10 @@ | ||
# ![Logo](https://cdn.minevalley.eu/branding/logo_64px_cropped.png) - Core API | ||
This api grants important features and access to the internal server-core of MineValleyEU, that is used in any module. | ||
|
||
This README.md is intended to help you with your daily issues or questions referring to our core and its components. It should offer you the most important information and give you answers to your upcoming questions. If this isn't the case sometimes, feel free to contact us on Discord. | ||
|
||
We do our best to update this documentary. There's no other source of information, that is more up-to-date, than this one. If there is any missing information or mistake in this README or if you should have any suggestions, please create a new issue, thank you! | ||
The wiki to this api is still work in progress. | ||
|
||
> **Core API**: | ||
> | ||
> version: _1.278_ | ||
> version: _1.278.1_ | ||
> | ||
> latest change: _07.01.2024_ | ||
|
||
### Documentation | ||
There will be comprehensive documentation in the "Wiki" tab | ||
> latest change: _12.01.2024_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters