Skip to content

Commit

Permalink
CI refactored (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanSchrass authored Feb 18, 2024
1 parent 78542aa commit 2d643df
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: CI
name: Build Workflow

on:
push:
branches: [ mainline ]
pull_request:
branches: [ mainline ]
workflow_dispatch:
workflow_call:

jobs:
build:
build-workflow:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -25,15 +23,4 @@ jobs:
uses: gradle/gradle-build-action@v2
id: build
with:
arguments: build --scan

- name: Publish
uses: gradle/gradle-build-action@v3
id: publish
with:
arguments: publish --scan
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
arguments: build --scan
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy Workflow

on:
workflow_call:

jobs:
deploy-workflow:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Publish
uses: gradle/gradle-build-action@v3
id: publish
with:
arguments: publish --scan
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHUSERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.ORG_GRADLE_PROJECT_OSSRHPASSWORD }}
8 changes: 8 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Pull Request Workflow
on:
pull_request:
branches: [ mainline ]

jobs:
build-workflow:
uses: ./.github/workflow/build.yml
10 changes: 10 additions & 0 deletions .github/workflows/tag-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-workflow:
uses: ./.github/workflow/build.yml
deplyo-workflow:
uses: ./.github/workflow/deploy.yml

0 comments on commit 2d643df

Please sign in to comment.