russhwolf
06/19/2023, 4:06 PM2023-06-16T21:03:27.0871000Z ##[group]GITHUB_TOKEN Permissions
2023-06-16T21:03:27.0871820Z Contents: read
2023-06-16T21:03:27.0872210Z Metadata: read
2023-06-16T21:03:27.0872940Z Packages: read
You'll need write permission for packages and contents for the publish flow to work.jean
06/21/2023, 8:32 AMcredentials {
username = System.getenv("GITHUB_USERNAME")
password = System.getenv("GITHUB_TOKEN")
}
And turned out Github Actions do not allow secrets starting with GITHUB
. That was the first thing. I changed them to ACTIONS_...
instead but now I’m facing this erro :
Invalid secret, ACTIONS_USERNAME is not defined in the referenced workflow. .github/workflows/kmmbridgepnblish.yml (Line: 12, Col: 22):
Invalid secret, ACTIONS_TOKEN is not defined in the referenced workflow.
I’ve tried a bunch a different thing in the yml file but haven’t figured it out yetrusshwolf
06/21/2023, 3:18 PM<http://maven.pkg.github.com|maven.pkg.github.com>
(configurable with the netrcMachine
input), and uses the netrcUsername
and netrcPassword
secrets as credentials.jean
07/04/2023, 7:00 AMCould not get resource […] Username must not be null!
russhwolf
07/05/2023, 3:30 PMjobs:
call-kmmbridge-publish:
permissions:
contents: write
packages: write
uses: touchlab/KMMBridgeGithubWorkflow/.github/workflows/faktorybuildbranches.yml@v0.9
secrets:
netrcUsername: ${{ secrets.ACTIONS_USERNAME }}
netrcPassword: ${{ secrets.ACTIONS_TOKEN }}
jean
07/06/2023, 12:14 PMUsername must not be null!
jean
07/09/2023, 6:40 AM> Could not PUT '<https://maven.pkg.github.com/jeantuffier/Tavla-Common/no/entur/tavla/CommonTavla-kmmbridge/0.1.0.1/CommonTavla-kmmbridge-0.1.0.1.zip|https://maven.pkg.github.com/jeantuffier/Tavla-Common/no/entur/tavla/CommonTavla-kmmbridge/0.1.0.1/CommonTavla-kmmbridge-0.1.0.1.zip>'. Received status code 422 from server: Unprocessable Entity
russhwolf
07/09/2023, 11:15 PMjean
07/12/2023, 9:29 AMjean
07/19/2023, 7:55 PMCaused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not PUT '<https://maven.pkg.github.com/jeantuffier/Tavla-Common/no/entur/tavla/common-tavla-kmmbridge/0.1.1.1/common-tavla-kmmbridge-0.1.1.1.zip>'. Received status code 409 from server: Conflict
It also adds a “.1” to my version.
I have this in my gradle file
kmmbridge {
mavenPublishArtifacts()
githubReleaseVersions()
spm()
addGithubPackagesRepository()
}
russhwolf
07/20/2023, 4:50 PMjean
07/25/2023, 7:22 PMversionPrefix.set("0.1")
to my configuration and it seems like its not trying to publish the package two times. Instead I get this error now :
org.gradle.internal.execution.WorkValidationException: A problem was found with the configuration of task ':publishKMMBridgeFrameworkPublicationToGithubRepository' (type 'PublishToMavenRepository').
- In plugin 'org.gradle.api.publish.maven.plugins.MavenPublishPlugin$Inject' type 'org.gradle.api.publish.maven.tasks.PublishToMavenRepository' property 'credentials.username' doesn't have a configured value.
Even though it did manage to publish a package