Skip to content

Commit bf7505e

Browse files
Updated publish.md with info about how to publish to Chocolatey
1 parent 2ff9744 commit bf7505e

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

publish.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ This typically occurs within 10 minutes, though updates to search can take up to
6565

6666
You should be able to see the binaries uploaded to [public Repository]
6767

68+
## Publish to Chocolatey
69+
70+
Make sure you set up a `CHOCOLATEY_API_KEY` environment variable with the API key used for Robocode.
71+
72+
```
73+
./gradlew chocoPush
74+
```
6875

6976
[staging Repository]: https://oss.sonatype.org/#stagingRepositories
7077

robocode.installer/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,15 @@ tasks {
130130
dependsOn(chocoBuild)
131131

132132
workingDir = file("build/choco")
133-
commandLine("choco", "push", "robocode.${project.version}.nupkg", "-s", "https://push.chocolatey.org/")
133+
commandLine(
134+
"choco",
135+
"push",
136+
"robocode.${project.version}.nupkg",
137+
"-s",
138+
"https://push.chocolatey.org/",
139+
"--api-key",
140+
System.getenv("CHOCOLATEY_API_KEY")
141+
)
134142
}
135143

136144
build {

0 commit comments

Comments
 (0)