Skip to content

Commit

Permalink
Upload OpenAPI Specification as Release Asset
Browse files Browse the repository at this point in the history
  • Loading branch information
dnl50 committed May 31, 2024
1 parent 455ff39 commit 07950ee
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ jobs:
asset_name: tsa-linux-amd64
asset_content_type: application/octet-stream

- name: Copy OpenAPI Spec to Temporary Folder
run: cp app/build/openapi-specification.json $RUNNER_TEMP/openapi-specification.json

- name: Upload OpenAPI Spec as Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ runner.temp }}/openapi-specification.json
asset_name: openapi-specification.json
asset_content_type: application/json

- name: Build and Push JVM Images
env:
QUARKUS_CONTAINER_IMAGE_BUILD: true
Expand Down
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-parameters")
}

// this file is used in the publish-workflow as well
val openApiSpecificationFile = layout.buildDirectory.file("openapi-specification.json")

tasks.test {
inputs.property("project-version", provider { project.version })
outputs.file(openApiSpecificationFile)
systemProperty("openapi.specification.target-file", openApiSpecificationFile.get().asFile.absolutePath)
}
Expand Down

0 comments on commit 07950ee

Please sign in to comment.