release-openapi #34
This file contains hidden or 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
| name: Release OpenAPI spec | |
| on: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| inputs: | |
| releaseVersion: | |
| required: true | |
| type: string | |
| description: The version to be released | |
| env: | |
| GIT_AUTHOR_NAME: localstack[bot] | |
| GIT_AUTHOR_EMAIL: localstack-bot@users.noreply.github.com | |
| GIT_COMMITTER_NAME: localstack[bot] | |
| GIT_COMMITTER_EMAIL: localstack-bot@users.noreply.github.com | |
| jobs: | |
| release-localstack-openapi: | |
| runs-on: ubuntu-latest | |
| env: | |
| release: ${{ github.event_name == 'workflow_dispatch' && inputs.releaseVersion || github.event.client_payload.releaseVersion}} | |
| steps: | |
| - name: Checkout OpenAPI | |
| uses: actions/checkout@v4 | |
| - name: Generate spec | |
| uses: ./.github/actions/generate-spec | |
| with: | |
| pro-ref: v${{ env.release }} | |
| pro-token: ${{ secrets.PRO_GITHUB_TOKEN }} | |
| - name: "Commit release version" | |
| # We set the openapi folder as a DEPENDENCY_FILE merely to have it added to the release commit | |
| run: | | |
| DEPENDENCY_FILE="openapi/" bin/release-helper.sh git-commit-release ${{ env.release }} | |
| git push --follow-tags | |
| - name: "Show git modifications" | |
| run: | | |
| git log --oneline -n 2 | |
| git show HEAD | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: v${{ env.release }} | |
| files: | | |
| openapi/emulators/localstack-spec.yml | |
| tag_name: v${{ env.release }} | |
| draft: true |