Skip to content

Commit 9bda0d8

Browse files
committed
Added release drafter
Added maven central release process Bump version
1 parent 75a92ca commit 9bda0d8

File tree

5 files changed

+122
-5
lines changed

5 files changed

+122
-5
lines changed

.github/release-drafter.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name-template: 'v$RESOLVED_VERSION 🌈'
2+
tag-template: 'v$RESOLVED_VERSION'
3+
categories:
4+
- title: '🚀 Features'
5+
labels:
6+
- 'feature'
7+
- 'enhancement'
8+
- title: '🐛 Bug Fixes'
9+
labels:
10+
- 'fix'
11+
- 'bugfix'
12+
- 'bug'
13+
- title: '🧰 Maintenance'
14+
label: 'chore'
15+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
16+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
17+
version-resolver:
18+
major:
19+
labels:
20+
- 'major'
21+
minor:
22+
labels:
23+
- 'minor'
24+
patch:
25+
labels:
26+
- 'patch'
27+
default: patch
28+
template: |
29+
## Changes
30+
31+
$CHANGES
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
# pull_request event is required only for autolabeler
9+
pull_request:
10+
# Only following types are handled by the action, but one can default to all as well
11+
types: [opened, reopened, synchronize]
12+
# pull_request_target event is required for autolabeler to support PRs from forks
13+
# pull_request_target:
14+
# types: [opened, reopened, synchronize]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
update_release_draft:
21+
permissions:
22+
# write permission is required to create a github release
23+
contents: write
24+
# write permission is required for autolabeler
25+
# otherwise, read permission is required at least
26+
pull-requests: write
27+
runs-on: ubuntu-latest
28+
steps:
29+
# Drafts your next Release notes as Pull Requests are merged into "master"
30+
- uses: release-drafter/release-drafter@v6
31+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
32+
# with:
33+
# config-name: my-config.yml
34+
# disable-autolabeler: true
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release to Maven Central
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-22.04
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 22
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '22'
21+
distribution: 'corretto'
22+
- name: Get GCC 12 for system header files
23+
run: |
24+
sudo apt install gcc-12
25+
- name: Install libcurl library for tests
26+
run: |
27+
sudo apt install libcurl4-openssl-dev
28+
- name: Get libcurl source for tests
29+
run: |
30+
cd annotation-processor-test/src/test/resources/libcurl && git clone --depth 1 https://github.com/curl/curl.git
31+
- name: Get libvlc for tests
32+
run: |
33+
cd annotation-processor-test/src/test/resources/libvlc && git clone --depth 1 https://github.com/videolan/vlc.git
34+
- name: Getting linux header version for tests
35+
run: |
36+
echo "headerVersion=$(uname -r)" >> "$GITHUB_ENV"
37+
- name: Change wrapper permissions
38+
run: chmod +x ./gradlew
39+
- name: Build Gradle
40+
run: |
41+
./gradlew build -Dversion=$headerVersion
42+
- name: Release to Maven
43+
env:
44+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }}
45+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }}
46+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }}
47+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }}
48+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }}
49+
run: |
50+
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache

annotation-processor/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ plugins {
44
}
55

66
group = 'io.github.digitalsmile.native'
7-
version = '1.0'
7+
version = '1.1'
88

99
repositories {
1010
mavenCentral()
1111
}
1212

1313
dependencies {
1414
implementation 'io.soabase.java-composer:java-composer:1.0'
15-
implementation 'io.github.digitalsmile.native:annotation:1.0'
15+
implementation 'io.github.digitalsmile.native:annotation:1.1'
1616

1717
annotationProcessor 'io.avaje:avaje-prisms:1.28'
1818
implementation 'io.avaje:avaje-prisms:1.28'
@@ -26,7 +26,7 @@ import com.vanniktech.maven.publish.SonatypeHost
2626
mavenPublishing {
2727
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
2828
signAllPublications()
29-
coordinates("io.github.digitalsmile.native", "annotation-processor", "1.0")
29+
coordinates("io.github.digitalsmile.native", "annotation-processor", "1.1")
3030

3131
pom {
3232
name = "Native Memory Annotation processor"

annotation/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = 'io.github.digitalsmile.native'
7-
version = '1.0'
7+
version = '1.1'
88

99
repositories {
1010
mavenCentral()
@@ -18,7 +18,7 @@ import com.vanniktech.maven.publish.SonatypeHost
1818
mavenPublishing {
1919
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
2020
signAllPublications()
21-
coordinates("io.github.digitalsmile.native", "annotation", "1.0")
21+
coordinates("io.github.digitalsmile.native", "annotation", "1.1")
2222

2323
pom {
2424
name = "Native Memory Annotation"

0 commit comments

Comments
 (0)