generated from theolm/kmm-template
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 1.16 KB
/
publish.yaml
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
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Publish
runs-on: macOS-latest
permissions:
contents: write
timeout-minutes: 60
steps:
- name: Set VERSION environment variable
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Fetch Sources
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}
- uses: ncipollo/release-action@v1
with:
bodyFile: "CHANGELOG.md"
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Deploy to Sonatype
run: ./gradlew publishAllPublicationsToMavenCentralRepository
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNINGINMEMORYKEYPASSWORD }}
VERSION: ${{ env.VERSION }}