mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-05 16:08:42 +01:00
Combine CI pipelines
This commit is contained in:
parent
fa6c7232a9
commit
7b41184d37
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
@ -5,7 +5,7 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Test, Build & Upload
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@ -63,42 +63,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd Plan
|
cd Plan
|
||||||
./gradlew build
|
./gradlew build
|
||||||
- name: SonarCloud
|
- name: Get versions
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
||||||
if: "${{ env.SONAR_TOKEN != '' }}"
|
|
||||||
run: |
|
run: |
|
||||||
cd Plan
|
cd Plan
|
||||||
./gradlew sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=player-analytics-plan
|
./gradlew snapshotVersion jarNameVersion
|
||||||
|
|
||||||
|
|
||||||
build_dev_jars:
|
|
||||||
name: Build DEV jars
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Setup JDK
|
|
||||||
uses: actions/setup-java@v2
|
|
||||||
with:
|
|
||||||
distribution: 'adopt'
|
|
||||||
java-version: '17'
|
|
||||||
- name: Cache Gradle packages
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-gradle-
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: |
|
|
||||||
cd Plan
|
|
||||||
./gradlew shadowJar snapshotVersion jarNameVersion
|
|
||||||
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
git_hash=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
echo "git_hash=$git_hash" >> $GITHUB_ENV
|
echo "git_hash=$git_hash" >> $GITHUB_ENV
|
||||||
echo "snapshotVersion=$(cat build/versions/snapshot.txt)" >> $GITHUB_ENV
|
echo "snapshotVersion=$(cat build/versions/snapshot.txt)" >> $GITHUB_ENV
|
||||||
@ -114,3 +82,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: PlanFabric-${{ env.versionString }}-${{ env.git_hash }}.jar
|
name: PlanFabric-${{ env.versionString }}-${{ env.git_hash }}.jar
|
||||||
path: ${{ env.artifactPath }}/PlanFabric-${{ env.snapshotVersion }}.jar
|
path: ${{ env.artifactPath }}/PlanFabric-${{ env.snapshotVersion }}.jar
|
||||||
|
- name: SonarCloud
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
if: "${{ env.SONAR_TOKEN != '' }}"
|
||||||
|
run: |
|
||||||
|
cd Plan
|
||||||
|
./gradlew sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=player-analytics-plan
|
||||||
|
Loading…
Reference in New Issue
Block a user