-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.46 KB
/
release.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
name: Release
on:
push:
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
if: github.repository == 'MobileTeleSystems/spark-dialect-extension' # prevent running on forks
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- run: ./gradlew jar sourcesJar scaladocJar
- run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
env:
# https://vanniktech.github.io/gradle-maven-publish-plugin/central/#in-memory-gpg-key
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PRIVATE_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_PUBLIC_KEY_ID_SHORT }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Create Github release
id: create_release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.ref_name }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
files: |
build/libs/spark-dialect-extension*.jar