-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (67 loc) · 2.26 KB
/
publish_snapshot.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
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Publish Project Snapshot
on:
push:
branches:
- 'master'
schedule:
- cron: '0 3 * * 1,4'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set up Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- name: Build app with Gradle
uses: gradle/gradle-build-action@v2
- run: ./gradlew currentVersion
- run: ./gradlew assemble
- name: Unwrap GPG key
env:
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }}
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'"
- name: Publish to Github Package Registry
run: ./gradlew publishAllPublicationsToGithubRepository
diffuse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
shell: bash
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 20
- uses: gradle/gradle-build-action@v2
- run: ./gradlew assemble -PskipJarVersion
- name: Upload diffuse base artifact
uses: actions/cache@v3
with:
path: diffuse-base-file
key: diffuse-${{ github.sha }}
- name: Check size
run: du -h android/build/libs/android.jar
shell: bash
- name: Copy diffuse base artifact to be picked by cache save
run: cp android/build/libs/android.jar diffuse-base-file
shell: bash