Add github actions to stable-7 workflows
Signed-off-by: Gabriel Harris-Rouquette <gabizou@me.com>
This commit is contained in:
5 files changed
+133
No files matched your search
@@ -0,0 +1,5 @@
|
||||
# Contribution Guidelines
|
||||
|
||||
We will always have a need for developers to help us improve Sponge. There is no such thing as a perfect project and things can always be improved. If you are a developer and are interested in helping then please do not hesitate. Just make sure you follow our guidelines.
|
||||
|
||||
Please check our [Contribution Guidelines in the Sponge Documentation](https://docs.spongepowered.org/en/contributing/guidelines.html) for more information.
|
||||
@@ -0,0 +1,54 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ stable-7 ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: run number with offset
|
||||
env:
|
||||
NUM: ${{ GITHUB_RUN_NUMBER }}
|
||||
run: |
|
||||
echo ::set-env name=BUILD_NUMBER::$(($NUM+93))
|
||||
- run: echo BUILD_NUMBER
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
env:
|
||||
CI_SYSTEM: Github Actions
|
||||
GIT_COMMIT: ${{ GITHUB_SHA }}
|
||||
GIT_BRANCH: ${{ GITHUB_REF }}
|
||||
- name: Archive artifacts for build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Sponge Jars
|
||||
path: |
|
||||
${{ github.workspace }}/build/libs/*.jar
|
||||
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
|
||||
# the publishing section of your build.gradle
|
||||
- name: Publish to Sponge Maven & GitHub Packages
|
||||
run: ./gradlew uploadArchives
|
||||
env:
|
||||
GITHUB_USERNAME: ${{ github.actor }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
ORG_GRADLE_PROJECT_spongeRepo: ${{ secrets.CREEPER_REPO_URL }}
|
||||
ORG_GRADLE_PROJECT_spongeSnapshotRepo: ${{ secrets.SPONGE_MAVEN_SNAPSHOT_REPO_URL }}
|
||||
ORG_GRADLE_PROJECT_spongeReleaseRepo: ${{ secrets.SPONGE_MAVEN_RELEASE_REPO_URL }}
|
||||
ORG_GRADLE_PROJECT_spongeUsername: ${{ secrets.CREEPER_REPO_USERNAME }}
|
||||
ORG_GRADLE_PROJECT_spongePassword: ${{ secrets.CREEPER_REPO_PASSWORD }}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build and archive PR with Gradle
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ stable-7 ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Archive artifacts for build
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: SpongeAPI Jars
|
||||
path: |
|
||||
${{ github.workspace }}/build/libs/*.jar
|
||||
@@ -0,0 +1,34 @@
|
||||
# This workflow will build a Java project with Gradle
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: License Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ stable-7 ]
|
||||
pull_request:
|
||||
branches: [ stable-7 ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Check license
|
||||
run: ./gradlew checkLicenses
|
||||
@@ -0,0 +1,10 @@
|
||||
name: "Validate Gradle Wrapper"
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Validation"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
Reference in new issue
Block a user