-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (68 loc) · 2.53 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Release OpenAPI spec
on:
repository_dispatch:
types: [release-openapi]
workflow_dispatch:
inputs:
releaseVersion:
required: true
type: string
description: The version to be released
env:
git_user_name: localstack[bot]
git_user_email: [email protected]
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 repo"
uses: actions/checkout@v4
- name: "Install release helper"
run: |
mkdir -p bin
curl -o bin/release-helper.sh -L https://api.github.com/repos/localstack/localstack/contents/bin/release-helper.sh -H 'Accept: application/vnd.github.v3.raw'
chmod +x bin/release-helper.sh
- name: "Prepare git config"
run: |
git config user.name ${{ env.git_user_name }}
git config user.email ${{ env.git_user_email }}
- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: "Wait for localstack, localstack-core, and localstack-ext release to appear"
timeout-minutes: 3
run: |
bin/release-helper.sh pip-download-retry localstack ${{ env.release }}
bin/release-helper.sh pip-download-retry localstack-core ${{ env.release }}
bin/release-helper.sh pip-download-retry localstack-ext ${{ env.release }}
- name: "Install LocalStack and LocalStack-ext"
run: |
python -m venv .venv
source .venv/bin/activate
pip install localstack==${{ env.release }}
- name: "Create tagged LocalStack OpenAPI spec"
run: |
source .venv/bin/activate
pip install click
pip install pyyaml
python bin/update-aws-spec.py
- 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: Release
uses: softprops/action-gh-release@v2
with:
name: v${{ env.release }}
files: |
openapi/emulators/localstack-spec.yml
draft: true
- name: "Show git modifications"
run: |
git log --oneline -n 2
git show HEAD