-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (79 loc) · 2.91 KB
/
release.yml
File metadata and controls
92 lines (79 loc) · 2.91 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
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: 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 repo"
uses: actions/checkout@v4
- name: "Install release helper"
env:
GITHUB_TOKEN: ${{ secrets.PRO_GITHUB_TOKEN }}
run: |
mkdir -p bin
curl -fsSL \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github.v3.raw" \
"https://api.github.com/repos/localstack/localstack-core/contents/bin/release-helper.sh" \
-o bin/release-helper.sh
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.13
- 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 OS packages
run: |
sudo apt-get update
sudo apt-get install -y --allow-downgrades libsnappy-dev jq libvirt-dev
- name: "Install LocalStack and LocalStack-ext"
run: |
python -m venv .venv
source .venv/bin/activate
pip install localstack-ext==${{ 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
tag_name: v${{ env.release }}
draft: true
- name: "Show git modifications"
run: |
git log --oneline -n 2
git show HEAD