-
Notifications
You must be signed in to change notification settings - Fork 71
61 lines (51 loc) · 1.79 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
name: Publish Kobweb artifacts
on:
workflow_dispatch:
inputs:
repo-gcloud:
type: boolean
description: "Repository: GCloud"
default: true
repo-sonatype:
type: boolean
description: "Repository: Sonatype"
default: true
repo-gradle-portal:
type: boolean
description: "Repository: Gradle Plugin Portal (release only)"
default: false
jobs:
publish:
runs-on: ubuntu-latest
env:
# See: https://docs.gradle.org/current/userguide/signing_plugin.html#sec:in-memory-keys
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.VARABYTE_SIGNING_KEY }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
build-scan-terms-of-use-agree: "yes"
cache-read-only: false
- name: Add secret Gradle properties
env:
GRADLE_PROPERTIES: ${{ secrets.VARABYTE_GRADLE_PROPERTIES }}
run: |
mkdir -p ~/.gradle/
echo "GRADLE_USER_HOME=${HOME}/.gradle" >> $GITHUB_ENV
echo "${GRADLE_PROPERTIES}" > ~/.gradle/gradle.properties
- name: Publish Kobweb artifacts (GCloud)
if: inputs.repo-gcloud
run: ./gradlew publishAllPublicationsToGCloudMavenRepository
- name: Publish Kobweb artifacts (Sonatype)
if: inputs.repo-sonatype
run: ./gradlew publishAllPublicationsToSonatypeMavenRepository
- name: Publish Kobweb artifacts (Gradle Plugin Portal)
if: inputs.repo-gradle-portal
run: ./gradlew publishPlugins