-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·56 lines (48 loc) · 1.9 KB
/
ci.yml
File metadata and controls
executable file
·56 lines (48 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on:
push:
branches:
- '**'
permissions: read-all
name: CI
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Check-out source code
uses: actions/checkout@v4
- name: Prepare GitHub release
id: create_prod_release
uses: googleapis/release-please-action@v4
if: github.ref == 'refs/heads/main'
with:
skip-github-pull-request: true
target-branch: ${{ github.ref_name }}
release-type: simple
- name: Define build properties
run: |
echo DO_RELEASE=${{ steps.create_prod_release.outputs.release_created || false }} >> $GITHUB_ENV
- name: Build
run: ./gradlew build
- name: Test publishing to Maven local repo
run: ./gradlew publishToMavenLocal -Dmaven.repo.local=./build/.m2
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PWD }}
- name: Publish to Maven Central
if: github.ref == 'refs/heads/main'
run: ./gradlew publishToMavenCentral closeAndReleaseMavenCentralStagingRepository -PisReleaseVersion=${{ env.DO_RELEASE }}
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PWD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
- name: Prepare release PR
uses: googleapis/release-please-action@v4
if: github.ref == 'refs/heads/main'
with:
skip-github-release: true
target-branch: ${{ github.ref_name }}
release-type: simple