-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (57 loc) · 1.82 KB
/
ci.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
name: CI
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
branches:
- "*"
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup jdk
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: '17'
- name: Validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Run UI tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
target: google_apis
profile: Galaxy Nexus
script: ./gradlew :grid:connectedDebugAndroidTest --stacktrace
heap-size: 2048M
release:
name: Release
runs-on: macos-latest
if: ${{ startsWith(github.ref, 'refs/tags/') && (github.repository == 'cheonjaeung/gridlayout-compose') }}
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup jdk
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: '17'
- name: Publish to Maven Central
run: ./gradlew publish --stacktrace
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PORTAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}