Skip to content

Commit

Permalink
Fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Jan 11, 2021
1 parent 1ac3804 commit cfd34d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew buildPlugin
run: ./gradlew buildCiJar

- name: Get Tag
id: tag
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./mirai-api-http/build/mirai/mirai-api-http-${{ steps.tag.outputs.tag }}.mirai.jar
asset_path: ./mirai-api-http/build/ci/mirai-api-http.jar
asset_name: mirai-api-http-${{ steps.tag.outputs.tag }}.mirai.jar
asset_content_type: application/zip
- name: Gradle publishPlugin
Expand Down
13 changes: 13 additions & 0 deletions mirai-api-http/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,16 @@ mirai {
override = true
}
}
tasks.create("buildCiJar", Jar::class) {
dependsOn("buildPlugin")
doLast {
val buildPluginTask = tasks.getByName("buildPlugin", Jar::class)
val buildPluginFile = buildPluginTask.archiveFile.get().asFile
project.buildDir.resolve("ci").also {
it.mkdirs()
}.resolve("mirai-api-http.jar").let {
buildPluginFile.copyTo(it, true)
}
}
}

0 comments on commit cfd34d2

Please sign in to comment.