-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,42 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
inputs: | ||
version: | ||
type: string | ||
description: | | ||
The version to be associated with the GitHub release that's created or updated. | ||
This will override any version calculated by the release-drafter. | ||
required: false | ||
|
||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- master | ||
|
||
jobs: | ||
oas-fetch: | ||
uses: ./.github/workflows/fetch-oas.yml | ||
secrets: inherit | ||
|
||
# Update the notes in the release drafter first | ||
# If the following jobs fail, then we will at least have some release notes present | ||
update_release_draft: | ||
needs: oas-fetch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Load OAS files from artifacts | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: release-drafter/[email protected] | ||
with: | ||
version: ${{github.event.inputs.version}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Generate the OAS schemas in another workflow | ||
oas-fetch: | ||
needs: update_release_draft | ||
uses: ./.github/workflows/fetch-oas.yml | ||
with: | ||
version: ${{github.event.inputs.version}} | ||
secrets: inherit | ||
# Upload the OAS schemas to the release object | ||
add-oas-to-release: | ||
needs: oas-fetch | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Load OAS files from artifacts | ||
uses: actions/download-artifact@v3 | ||
|
||
- name: Upload Release Asset - OpenAPI Specification - YAML | ||
id: upload-release-asset-yaml | ||
|
@@ -55,3 +59,5 @@ jobs: | |
asset_path: ./oas-json/oas.json | ||
asset_name: oas.json | ||
asset_content_type: application/json | ||
|
||
|