11name : Release OpenAPI spec
22on :
33 repository_dispatch :
4- types : [release-openapi]
54 workflow_dispatch :
65 inputs :
76 releaseVersion :
109 description : The version to be released
1110
1211env :
13- git_user_name : localstack[bot]
14- git_user_email : localstack-bot@users.noreply.github.com
12+ GIT_AUTHOR_NAME : localstack[bot]
13+ GIT_AUTHOR_EMAIL : localstack-bot@users.noreply.github.com
14+ GIT_COMMITTER_NAME : localstack[bot]
15+ GIT_COMMITTER_EMAIL : localstack-bot@users.noreply.github.com
1516
1617jobs :
1718 release-localstack-openapi :
@@ -20,63 +21,26 @@ jobs:
2021 release : ${{ github.event_name == 'workflow_dispatch' && inputs.releaseVersion || github.event.client_payload.releaseVersion}}
2122
2223 steps :
23- - name : " Checkout OpenAPI repo "
24+ - name : Checkout OpenAPI
2425 uses : actions/checkout@v4
2526
26- - name : " Install release helper"
27- env :
28- GITHUB_TOKEN : ${{ secrets.PRO_GITHUB_TOKEN }}
29- run : |
30- mkdir -p bin
31- curl -fsSL \
32- -H "Authorization: Bearer ${GITHUB_TOKEN}" \
33- -H "Accept: application/vnd.github.v3.raw" \
34- "https://api.github.com/repos/localstack/localstack-core/contents/bin/release-helper.sh" \
35- -o bin/release-helper.sh
36- chmod +x bin/release-helper.sh
37-
38- - name : " Prepare git config"
39- run : |
40- git config user.name ${{ env.git_user_name }}
41- git config user.email ${{ env.git_user_email }}
42-
43- - name : Set up Python
44- id : setup-python
45- uses : actions/setup-python@v5
27+ - name : Generate spec
28+ uses : ./.github/actions/generate-spec
4629 with :
47- python-version : 3.13
48-
49- - name : " Wait for localstack, localstack-core, and localstack-ext release to appear"
50- timeout-minutes : 3
51- run : |
52- bin/release-helper.sh pip-download-retry localstack ${{ env.release }}
53- bin/release-helper.sh pip-download-retry localstack-core ${{ env.release }}
54- bin/release-helper.sh pip-download-retry localstack-ext ${{ env.release }}
55-
56- - name : Install OS packages
57- run : |
58- sudo apt-get update
59- sudo apt-get install -y --allow-downgrades libsnappy-dev jq libvirt-dev
60-
61- - name : " Install LocalStack and LocalStack-ext"
62- run : |
63- python -m venv .venv
64- source .venv/bin/activate
65- pip install localstack-ext==${{ env.release }}
66-
67- - name : " Create tagged LocalStack OpenAPI spec"
68- run : |
69- source .venv/bin/activate
70- pip install click
71- pip install pyyaml
72- python bin/update-aws-spec.py
30+ pro-ref : v${{ env.release }}
31+ pro-token : ${{ secrets.PRO_GITHUB_TOKEN }}
7332
7433 - name : " Commit release version"
7534 # We set the openapi folder as a DEPENDENCY_FILE merely to have it added to the release commit
7635 run : |
7736 DEPENDENCY_FILE="openapi/" bin/release-helper.sh git-commit-release ${{ env.release }}
7837 git push --follow-tags
7938
39+ - name : " Show git modifications"
40+ run : |
41+ git log --oneline -n 2
42+ git show HEAD
43+
8044 - name : Release
8145 uses : softprops/action-gh-release@v2
8246 with :
8549 openapi/emulators/localstack-spec.yml
8650 tag_name : v${{ env.release }}
8751 draft : true
88-
89- - name : " Show git modifications"
90- run : |
91- git log --oneline -n 2
92- git show HEAD
0 commit comments