Skip to content

Commit 13fa297

Browse files
ci: Use shared-build project for Github Actions
1 parent e059aca commit 13fa297

File tree

3 files changed

+30
-54
lines changed

3 files changed

+30
-54
lines changed

.github/workflows/ci.yml

+16-44
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,23 @@
44
# https://github.com/marketplace/actions/action-for-semantic-release
55

66
name: CI
7-
on: [ push, pull_request ]
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
814
jobs:
915
build:
10-
runs-on: macos-latest
11-
steps:
12-
- uses: actions/checkout@v4
13-
- name: Set up JDK 17
14-
uses: actions/setup-java@v4
15-
with:
16-
java-version: '17'
17-
distribution: 'adopt'
18-
- name: Build with Gradle
19-
run: ./gradlew build
20-
- uses: actions/upload-artifact@v4
21-
if: always()
22-
with:
23-
name: build-directory
24-
path: build
25-
- uses: codecov/codecov-action@v4
26-
with:
27-
files: server/build/reports/jacoco/test/jacocoTestReport.xml
28-
verbose: true
29-
- uses: codecov/codecov-action@v4
30-
with:
31-
files: client/build/reports/jacoco/test/jacocoTestReport.xml
32-
verbose: true
33-
env:
34-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
16+
uses: lsd-consulting/shared-workflows/.github/workflows/build.yml@main
17+
with:
18+
java-version: '17'
19+
codecov: true
20+
secrets: inherit
3521
release:
3622
needs: build
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v4
41-
- name: Semantic Release
42-
uses: cycjimmy/semantic-release-action@v4
43-
id: semantic
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
- name: Publish to Sonatype
47-
if: steps.semantic.outputs.new_release_published == 'true'
48-
env:
49-
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
50-
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
51-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
52-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
53-
run: |
54-
./gradlew publishToSonatype closeAndReleaseStagingRepository
23+
uses: lsd-consulting/shared-workflows/.github/workflows/release.yml@main
24+
with:
25+
java-version: '17'
26+
secrets: inherit
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Merge dependabot PR
2+
on:
3+
pull_request_target:
4+
branches:
5+
- main
6+
- master
7+
jobs:
8+
pr-merge:
9+
uses: lsd-consulting/shared-workflows/.github/workflows/dependabot-merge.yml@main
10+
secrets: inherit

.github/workflows/nightly.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
name: Nightly Build
22
on:
3+
workflow_dispatch:
34
schedule:
45
- cron: '0 2 * * *' # run at 2 AM UTC
56
jobs:
67
build:
7-
runs-on: macos-latest
8-
steps:
9-
- uses: actions/checkout@v4
10-
- name: Set up JDK 17
11-
uses: actions/setup-java@v4
12-
with:
13-
java-version: '17'
14-
distribution: 'adopt'
15-
- name: Build with Gradle
16-
run: ./gradlew build
8+
uses: lsd-consulting/shared-workflows/.github/workflows/build.yml@main
9+
with:
10+
java-version: '17'

0 commit comments

Comments
 (0)