Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Merge 7e1f7f8 into 76a1f41
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonnnj committed Sep 8, 2020
2 parents 76a1f41 + 7e1f7f8 commit ba3d6b9
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: release

on:
release:
types: [prereleased, released]

env:
ASSET_NAME: skeleton-aws-lambda.zip
PIP_CACHE_DIR: ~/.cache/pip

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Store installed Python version
run: |
echo "::set-env name=PY_VERSION::"\
"$(python -c "import platform;print(platform.python_version())")"
- name: Cache lambda building environments
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: "release-${{ runner.os }}-py${{ env.PY_VERSION }}-\
${{ hashFiles('**/requirements.txt') }}"
restore-keys: |
release-${{ runner.os }}-py${{ env.PY_VERSION }}-
release-${{ runner.os }}-
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install --upgrade --requirement requirements.txt
- name: Build environment
run: docker-compose build
- name: Generate lambda zip
run: docker-compose up
- name: Upload lambda zip as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ASSET_NAME }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/zip

0 comments on commit ba3d6b9

Please sign in to comment.