-
Notifications
You must be signed in to change notification settings - Fork 13
71 lines (59 loc) · 1.96 KB
/
publish-to-maven.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
71
name: Publish to Maven Central
on:
push:
branches:
- publish-to-maven
env:
NEW_VERSION: ${{ github.event.inputs.version }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
jobs:
validate:
strategy:
matrix:
include:
# - os: macos-latest
- os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Setup Gradle cache
uses: actions/cache@v3
with:
path: |
~/.konan
key: ${{ runner.os }}-${{ hashFiles('**/.lock') }}
# Нужна ли эта проверка?
- name: Ensure main branch
run: ./.github/sh/validate_publishing_branch.sh
# - name: Validate library version update
# run: ./.github/sh/validate_version_update.sh "libraryVersion" "$NEW_VERSION"
- name: Validate publishing
run: |
./gradlew \
-xtest \
-xlint \
publishToMavenLocal
# - name: Publishing
# run: |
# ./gradlew \
# -xtest \
# -xlint \
# publishToMavenLocal