Skip to content

Merge pull request #137 from rlqu/add/placeholders-module #40

Merge pull request #137 from rlqu/add/placeholders-module

Merge pull request #137 from rlqu/add/placeholders-module #40

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Build and Publish
on:
#schedule:
# - cron: '37 7 * * *'
push:
branches: [ "dev/2.0", "master" ]
# Publish semver tags as releases.
#tags: [ 'v*.*.*' ]
#pull_request:
# branches: [ "development", "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: shadowJar
- name: Copy files
run: |
mkdir -p temp
mkdir temp/modules/
mkdir temp/storage/
mkdir temp/storage/pluginJars/
cp start-files/*.* temp/
cp simplecloud-modules/**/build/libs/SimpleCloud-*.jar temp/modules/
cp simplecloud-runner/build/libs/runner.jar temp/runner.jar
cp simplecloud-base/build/libs/base.jar temp/storage/base.jar
cp simplecloud-plugin/build/libs/*.jar temp/storage/pluginJars/
cp simplecloud-dependency-loader/build/libs/dependency-loader.jar temp/storage/dependency-loader.jar
cp simplecloud-launcher/build/libs/launcher.jar temp/launcher.jar
rm temp/modules/SimpleCloud-Chat+Tab.jar
rm temp/modules/SimpleCloud-ServiceSelection.jar
rm temp/modules/SimpleCloud-CloudFlare.jar
- name: Upload zip
uses: actions/upload-artifact@v3
with:
name: SimpleCloud-Latest
path: temp/
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Publish
uses: gradle/gradle-build-action@v2
with:
arguments: publish
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}