Skip to content

Commit ce3b30d

Browse files
committed
Fix publishing
1 parent cac6216 commit ce3b30d

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

.github/workflows/publish.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,20 @@ jobs:
4040
- name: "Publish"
4141
shell: sh
4242
run: |
43-
sh gradlew publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidDebugPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository kmmBridgePublish \
43+
sh gradlew publishKotlinMultiplatformPublicationToGitHubPackagesRepository publishAndroidReleasePublicationToGitHubPackagesRepository kmmBridgePublish \
4444
-PGITHUB_ARTIFACT_RELEASE_ID=${{ steps.devrelease.outputs.id }} \
4545
-PENABLE_PUBLISHING=true \
4646
-PGITHUB_PUBLISH_TOKEN=${{ secrets.GITHUB_TOKEN }} \
47-
-PGITHUB_REPO=${{ github.repository }}
48-
--no-daemon --info --stacktrace
47+
-PGITHUB_REPO=${{ github.repository }} \
48+
--no-daemon \
49+
--info \
50+
--stacktrace
51+
52+
# The GitHub Release hosts the Xcode binary, but we need to query GitHub for the URL after the binary is uploaded,
53+
# then generate the Package.swift file. Once that is committed, we need to point the release tag at the final commit.
54+
- uses: touchlab/ga-update-release-tag@v1
55+
id: update-release-tag
56+
with:
57+
commitMessage: "KMP SPM package release for ${{ steps.versionPropertyValue.outputs.propVal }}"
58+
tagMessage: "KMP release version ${{ steps.versionPropertyValue.outputs.propVal }}"
59+
tagVersion: ${{ steps.versionPropertyValue.outputs.propVal }}

build.gradle.kts

+18
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,24 @@ kmmbridge {
185185
)
186186
}
187187

188+
addGithubPackagesRepository()
189+
190+
publishing {
191+
repositories {
192+
mavenLocal()
193+
maven {
194+
name = "AirthingsGitHubPackages"
195+
url = uri("https://maven.pkg.github.com/airthings/kmplog")
196+
197+
credentials {
198+
// The following are automatically generated by GitHub.
199+
username = System.getenv("GITHUB_ACTOR")
200+
password = System.getenv("GITHUB_TOKEN")
201+
}
202+
}
203+
}
204+
}
205+
188206
/**
189207
* Apple requires 3rd party frameworks to include a privacy policy file.
190208
*

0 commit comments

Comments
 (0)