generated from tozydev/kotlin-paper-template
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.63 KB
/
deploy.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
name: Gradle deploy
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release-created: ${{ steps.release.outputs.release-created }}
steps:
- name: Release Please Action
id: release
uses: googleapis/release-please-action@v4
with:
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
skip-github-pull-request: true
publish:
if: needs.release.outputs.release-created == 'true'
runs-on: ubuntu-latest
environment: Vela
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get JDK version
run: echo "JDK_VERSION=$(grep 'jdkVersion' gradle.properties | cut -d '=' -f2)" >> "$GITHUB_ENV"
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{ env.JDK_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Grant execute permission to gradlew
run: chmod +x gradlew
- name: Publish with Gradle
id: publish
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_velaUsername: ${{ secrets.VELA_USERNAME }}
ORG_GRADLE_PROJECT_velaPassword: ${{ secrets.VELA_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}