-
Notifications
You must be signed in to change notification settings - Fork 14
88 lines (77 loc) · 2.86 KB
/
cloudpod_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
81
82
83
84
85
86
87
88
on:
workflow_dispatch:
inputs:
release-tag:
type: string
required: true
description: This will be the version of the release, but will also be used as 'tag' for the localstack docker image
push:
paths-ignore:
- ./*.md
- LICENSE
- .circleci/*
- .gitlab-ci.yml
branches:
- main
permissions:
contents: write
name: Create Release
jobs:
release:
name: Create Release for Cloud Pod
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.11
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Set up Project
run: |
pip install -r requirements-dev.txt
- name: Start LocalStack
uses: LocalStack/[email protected]
with:
image-tag: ${{ inputs.release-tag || 'latest'}}
use-pro: 'true'
install-awslocal: 'true'
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
- name: Build lambdas
run: |
bin/build_lambdas.sh
- name: Deploy infrastructure
run: |
deployment/awslocal/deploy.sh
- name: Run Tests
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
run: |
pytest tests
# Not using action as state is not stored as an artifact
- name: Save the Cloud Pod
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
run: |
localstack state export release-pod.zip
- name: Prepare Release Notes
run: |
echo "This release includes the Cloud Pod of the sample created with LocalStack Version \`${{ inputs.release-tag || 'latest'}}\`." > Release.txt
echo "You can download the \`release-pod.zip\` and inject it manually by running \`localstack state import release-pod.zip\`, or use the Cloud Pods Launchpad." >> Release.txt
echo "### Cloud Pods Launchpad" >> Release.txt
echo "You can click the Launchpad to inject the the pod into your running LocalStack instance using the WebUI:" >> Release.txt
echo "[![LocalStack Pods Launchpad](https://localstack.cloud/gh/launch-pod-badge.svg)](https://app.localstack.cloud/launchpad?url=https://github.com/$GITHUB_REPOSITORY/releases/download/${{ inputs.release-tag || 'latest'}}/release-pod.zip)" >> Release.txt
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: "${{ inputs.release-tag || 'latest'}}"
name: "Cloud Pod for LocalStack Version '${{ inputs.release-tag || 'latest'}}'"
body_path: ./Release.txt
files: |
./release-pod.zip