-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 2 KB
/
publish.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Publish a new Release
on:
push:
tags:
- '1.*'
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: 'Tag to use for the release and changelog'
concurrency:
group: "publish"
cancel-in-progress: true
jobs:
publish:
runs-on: macos-latest
environment: publishing
steps:
- uses: actions/checkout@v4
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
check-latest: true
java-version: 22
cache: 'gradle'
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Publish to sonatype
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew publishToMavenCentral --no-configuration-cache
- name: Generate Changelog
uses: mikepenz/release-changelog-builder-action@v4
id: build_changelog
with:
commitMode: true
configuration: ".github/changelog_config.json"
- name: Create GH release
uses: ncipollo/[email protected]
id: create_release
with:
draft: true
artifactErrorsFailBuild: true
prerelease: false
body: ${{steps.build_changelog.outputs.changelog}}
tag: ${{ inputs.tag != '' && inputs.tag || github.ref_name }}
env:
GITHUB_TOKEN: ${{ github.token }}