Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Refrac committed May 25, 2024
2 parents 47347ea + 2ca455c commit 6ed13f5
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/bungee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prepare Project
uses: actions/checkout@v3
with:
ref: 'main'

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: |
mvn -B install --file ./SimpleStaffChat-Bungee/pom.xml
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'Bungee-${{ env.PROJECT_VERSION }}'
release_name: SimpleStaffChat-Bungee ${{ env.PROJECT_VERSION }}
draft: false
prerelease: true

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: './SimpleStaffChat-Bungee/target/SimpleStaffChat-Bungee-${{ env.PROJECT_VERSION }}.jar'
asset_name: 'SimpleStaffChat-Bungee-${{ env.PROJECT_VERSION }}.jar'
asset_content_type: 'application/java-archive'
50 changes: 50 additions & 0 deletions .github/workflows/spigot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Prepare Project
uses: actions/checkout@v3
with:
ref: 'main'

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: |
mvn -B install --file ./SimpleStaffChat-Spigot/pom.xml
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: 'Spigot-${{ env.PROJECT_VERSION }}'
release_name: SimpleStaffChat-Spigot ${{ env.PROJECT_VERSION }}
draft: false
prerelease: true

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: './SimpleStaffChat-Spigot/target/SimpleStaffChat-Spigot-${{ env.PROJECT_VERSION }}.jar'
asset_name: 'SimpleStaffChat-Spigot-${{ env.PROJECT_VERSION }}.jar'
asset_content_type: 'application/java-archive'
10 changes: 5 additions & 5 deletions .github/workflows/build.yml → .github/workflows/velocity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Build with Maven
run: |
mvn -B install --file pom.xml
mvn -B install --file ./SimpleStaffChat-Velocity/pom.xml
echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create Release
Expand All @@ -33,8 +33,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: '${{ env.PROJECT_VERSION }}-SNAPSHOT'
release_name: SimpleTags
tag_name: 'Velocity-${{ env.PROJECT_VERSION }}'
release_name: SimpleStaffChat-Velocity ${{ env.PROJECT_VERSION }}
draft: false
prerelease: true

Expand All @@ -45,6 +45,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: './target/SimpleStaffChat-${{ env.PROJECT_VERSION }}.jar'
asset_name: 'SimpleStaffChat-${{ env.PROJECT_VERSION }}.jar'
asset_path: './SimpleStaffChat-Velocity/target/SimpleStaffChat-Velocity-${{ env.PROJECT_VERSION }}.jar'
asset_name: 'SimpleStaffChat-Velocity-${{ env.PROJECT_VERSION }}.jar'
asset_content_type: 'application/java-archive'

0 comments on commit 6ed13f5

Please sign in to comment.