Skip to content

Commit 893e5b1

Browse files
committed
Merge #473 from branch 'metafacture-fix-265-publishToGithubPackages' of github.com:metafacture/metafacture-core
2 parents 67d158b + bb7e3cf commit 893e5b1

File tree

7 files changed

+49
-272
lines changed

7 files changed

+49
-272
lines changed

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
push:
4+
branches:
5+
- 'publish'
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-java@v1
12+
with:
13+
java-version: 1.8
14+
- name: Publish package
15+
run: ./gradlew publish
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+

.travis.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies {
6060
}
6161
```
6262

63-
Occasionally, we publish snapshot builds on [Sonatype OSS Repository](https://oss.sonatype.org/index.html#nexus-search;gav~org.metafacture~~~~). The version number is derived from the branch name. Snapshot builds from the master branch always have the version `master-SNAPSHOT`.
63+
Occasionally, we publish snapshot builds on [Sonatype OSS Repository](https://oss.sonatype.org/index.html#nexus-search;gav~org.metafacture~~~~). The version number is derived from the branch name. Snapshot builds from the master branch always have the version `master-SNAPSHOT`. We also provide sometimes pre releases as github packages.
6464

6565
<!--
6666
TODO: Link to getting started tutorial

build.gradle

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ subprojects {
5757
apply plugin: 'maven'
5858
apply plugin: 'jacoco'
5959
apply plugin: 'checkstyle'
60+
apply plugin: 'maven-publish'
6061

6162
check.dependsOn(editorconfigCheck)
6263
check.dependsOn(javadoc)
@@ -127,6 +128,35 @@ subprojects {
127128
mavenLocal()
128129
mavenCentral()
129130
}
131+
132+
publishing {
133+
publications {
134+
mavenArtifacts(MavenPublication) {
135+
from components.java
136+
afterEvaluate {
137+
groupId = project.group
138+
artifactId = project.name
139+
}
140+
}
141+
}
142+
repositories {
143+
maven {
144+
name = 'localEmbedded'
145+
// run generated gradle task `./gradlew
146+
// publishMavenArtifactsPublicationToLocalEmbeddedRepository`
147+
// to publish all subprojects into the same local embedded repo:
148+
url = "file://${rootDir}/build/repo"
149+
}
150+
maven {
151+
name = "GitHubPackages"
152+
url = "https://maven.pkg.github.com/metafacture/metafacture-core"
153+
credentials {
154+
username = System.getenv("GITHUB_ACTOR")
155+
password = System.getenv("GITHUB_TOKEN")
156+
}
157+
}
158+
}
159+
}
130160
}
131161

132162
gradle.projectsEvaluated {
@@ -241,10 +271,6 @@ gradle.projectsEvaluated {
241271
}
242272
}
243273
}
244-
245-
task publish {
246-
dependsOn tasks.uploadArchives
247-
}
248274
}
249275
}
250276

travis/publish.sh

Lines changed: 0 additions & 114 deletions
This file was deleted.

travis/sonarqube.sh

Lines changed: 0 additions & 36 deletions
This file was deleted.

travis/switch-to-branch.sh

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)