Skip to content

Commit 12ffab6

Browse files
authored
Release workflow (#5)
Merged without review.
1 parent 668ea34 commit 12ffab6

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish release packages
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
- name: Set up Java
11+
uses: actions/setup-java@v3
12+
with:
13+
java-version: '11'
14+
distribution: 'adopt'
15+
- name: Validate Gradle wrapper
16+
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
17+
- name: Publish package
18+
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629
19+
with:
20+
arguments: publish

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ undeploy:
3535
deploy-samples:
3636
kubectl apply -f ./deploy/samples
3737

38+
release:
39+
./gradlew publish
40+
3841
.PHONY: build clean quickstart deploy-dev-environment deploy deploy-samples integration-tests

hoptimator-catalog/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'java-library'
33
id 'idea'
4+
id 'maven-publish'
45
}
56

67
dependencies {
@@ -11,6 +12,25 @@ dependencies {
1112
testImplementation libs.assertj
1213
}
1314

15+
publishing {
16+
repositories {
17+
maven {
18+
url = "https://maven.pkg.github.com/linkedin/Hoptimator"
19+
credentials {
20+
username = System.getenv('GITHUB_ACTOR')
21+
password = System.getenv('GITHUB_TOKEN')
22+
}
23+
}
24+
}
25+
publications {
26+
maven(MavenPublication) {
27+
groupId = 'com.linkedin.hoptimator'
28+
artifactId = 'hoptimator-catalog'
29+
from components.java
30+
}
31+
}
32+
}
33+
1434
tasks.withType(JavaCompile) {
1535
options.compilerArgs << '-Xlint:deprecation'
1636
options.compilerArgs << '-Xlint:unchecked'

hoptimator-planner/build.gradle

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
id 'java-library'
33
id 'idea'
4+
id 'maven-publish'
45
}
56

67
dependencies {
@@ -10,6 +11,25 @@ dependencies {
1011
api libs.calciteCore
1112
}
1213

14+
publishing {
15+
repositories {
16+
maven {
17+
url = "https://maven.pkg.github.com/linkedin/Hoptimator"
18+
credentials {
19+
username = System.getenv('GITHUB_ACTOR')
20+
password = System.getenv('GITHUB_TOKEN')
21+
}
22+
}
23+
}
24+
publications {
25+
maven(MavenPublication) {
26+
groupId = 'com.linkedin.hoptimator'
27+
artifactId = 'hoptimator-planner'
28+
from components.java
29+
}
30+
}
31+
}
32+
1333
tasks.withType(JavaCompile) {
1434
options.compilerArgs << '-Xlint:deprecation'
1535
options.compilerArgs << '-Xlint:unchecked'

0 commit comments

Comments
 (0)