Skip to content

Commit 69099f9

Browse files
authored
Merge pull request #233 from cozydev-pink/sam/central-migration
migrate publishing to central
2 parents 71e6f5f + cc686de commit 69099f9

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ jobs:
7474
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc
7575

7676
- name: Make target directories
77-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
77+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
7878
run: mkdir -p lucene/target unidocs/target project/target
7979

8080
- name: Compress target directories
81-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
81+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
8282
run: tar cf targets.tar lucene/target unidocs/target project/target
8383

8484
- name: Upload target directories
85-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
85+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
8686
uses: actions/upload-artifact@v4
8787
with:
8888
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
@@ -91,7 +91,7 @@ jobs:
9191
publish:
9292
name: Publish Artifacts
9393
needs: [build]
94-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
94+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
9595
strategy:
9696
matrix:
9797
os: [ubuntu-22.04]

build.sbt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import xerial.sbt.Sonatype.sonatypeCentralHost
2+
13
// https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway
24
ThisBuild / tlBaseVersion := "0.0" // your current series x.y
35

@@ -10,15 +12,12 @@ ThisBuild / developers := List(
1012
tlGitHubDev("valencik", "Andrew Valencik")
1113
)
1214

13-
// publish to s01.oss.sonatype.org (set to true to publish to oss.sonatype.org instead)
14-
ThisBuild / tlSonatypeUseLegacyHost := false
15+
// use Sonatype Central
16+
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
1517

1618
// publish website from this branch
1719
ThisBuild / tlSitePublishBranch := Some("main")
1820

19-
// publish snapshots from main branch
20-
ThisBuild / tlCiReleaseBranches := Seq("main")
21-
2221
// use JDK 11
2322
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
2423

0 commit comments

Comments
 (0)