Skip to content

Commit 0b0ec5a

Browse files
authored
Merge pull request #82 from Banno/sonatype-central
Prepare to publish to Sonatype Central
2 parents dddc653 + 4fcaad9 commit 0b0ec5a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/ci.yml

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

9595
- name: Make target directories
96-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
96+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
9797
run: mkdir -p rules/target project/target
9898

9999
- name: Compress target directories
100-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
100+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
101101
run: tar cf targets.tar rules/target project/target
102102

103103
- name: Upload target directories
104-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
104+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
105105
uses: actions/upload-artifact@v4
106106
with:
107107
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
@@ -110,7 +110,7 @@ jobs:
110110
publish:
111111
name: Publish Artifacts
112112
needs: [build]
113-
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
113+
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
114114
strategy:
115115
matrix:
116116
os: [ubuntu-22.04]

build.sbt

Lines changed: 3 additions & 1 deletion
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.4" // your current series x.y
35

@@ -10,7 +12,7 @@ ThisBuild / developers := List(
1012
tlGitHubDev("samspills", "Sam Pillsworth")
1113
)
1214

13-
ThisBuild / tlSonatypeUseLegacyHost := true // publish to oss.sonatype.org
15+
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost
1416

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

0 commit comments

Comments
 (0)