Skip to content

Commit

Permalink
Merge pull request #40 from rhettre/rhettre-patch-1
Browse files Browse the repository at this point in the history
Create lambda-layer.yml
  • Loading branch information
rhettre authored Jul 23, 2024
2 parents 5b8b768 + f9be6af commit 943b3bc
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/lambda-layer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Release Lambda Layer

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Match this to your target Python version

- name: Install virtualenv and dependencies
run: |
pip install virtualenv
virtualenv venv
source venv/bin/activate
mkdir python
pip install requests coinbase-advancedtrade-python --target ./python
- name: Package dependencies
run: |
zip -r9 layer.zip python
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Layer to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./layer.zip
asset_name: layer.zip
asset_content_type: application/zip

0 comments on commit 943b3bc

Please sign in to comment.