diff --git a/.github/workflows/bungee.yml b/.github/workflows/bungee.yml new file mode 100644 index 0000000..39040bd --- /dev/null +++ b/.github/workflows/bungee.yml @@ -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' diff --git a/.github/workflows/spigot.yml b/.github/workflows/spigot.yml new file mode 100644 index 0000000..e1caf8d --- /dev/null +++ b/.github/workflows/spigot.yml @@ -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' diff --git a/.github/workflows/build.yml b/.github/workflows/velocity.yml similarity index 74% rename from .github/workflows/build.yml rename to .github/workflows/velocity.yml index b769b70..ffb7a53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/velocity.yml @@ -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 @@ -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 @@ -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'