Skip to content

Commit f7c047d

Browse files
committed
Adding maven publishing
1 parent f104d1f commit f7c047d

File tree

4 files changed

+91
-2
lines changed

4 files changed

+91
-2
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build to Maven Local
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- '*'
11+
- '!ci_test_*'
12+
tags-ignore:
13+
- '*'
14+
pull_request:
15+
branches:
16+
- '*'
17+
- '!ci_test_*'
18+
- 'master'
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
environment: Maven Central
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: set up JDK 17
27+
uses: actions/setup-java@v3
28+
with:
29+
java-version: '17'
30+
distribution: 'adopt'
31+
cache: gradle
32+
- name: Set version variable
33+
run: echo "GITHUB_REF_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
34+
- name: Compile to maven local
35+
env:
36+
VERSION_NAME: ${{ env.GITHUB_REF_NAME }}
37+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
38+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
39+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
40+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
41+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
42+
run: bash ./gradlew avif-coder-coil:publishToMavenLocal
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Create Release
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
tags:
10+
- '*'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
environment: Maven Central
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: set up JDK 17
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '17'
22+
distribution: 'adopt'
23+
cache: gradle
24+
- name: Set version variable
25+
run: echo "GITHUB_REF_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
26+
- name: Compile to Maven Central
27+
env:
28+
VERSION_NAME: ${{ env.GITHUB_REF_NAME }}
29+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
30+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
31+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
32+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
34+
PUBLISH_STATE: Release
35+
run: bash ./gradlew avif-coder-coil:publishAllPublicationsToMavenCentralRepository
36+
37+
release:
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: write
41+
needs:
42+
- build
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: ncipollo/release-action@v1
46+
with:
47+
bodyFile: 'CHANGELOG.md'

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id("com.android.application") version "8.10.0-rc04" apply false
3+
id("com.android.application") version "8.12.0" apply false
44
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Sun Sep 17 23:53:38 MYT 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)