forked from aws-samples/cloudfront-authorization-at-edge
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01c1bc8
commit c33e44e
Showing
3 changed files
with
2,273 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
name: Create Lambda Release Artefacts | ||
|
||
jobs: | ||
build: | ||
name: Create Lambda Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install brew packages | ||
run: sudo apt-get install build-essential curl file git | ||
|
||
- name: Install homebrew | ||
run: | | ||
git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew | ||
mkdir ~/.linuxbrew/bin | ||
ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin | ||
eval $(~/.linuxbrew/bin/brew shellenv) | ||
- name: Install sam | ||
run: | | ||
brew tap aws/tap | ||
brew install aws-sam-cli | ||
- name: Build project | ||
run: | | ||
npm ci | ||
npm run-script build | ||
sam build --use-container | ||
- name: Zip images | ||
working-directory: .aws-sam/build | ||
run: | | ||
readarray -t lambda_dirs <<< "$(find . -maxdepth 1 -mindepth 1 -type d)" | ||
for dir in "${lambda_dirs[@]}"; do | ||
export dir="${dir}" | ||
( cd "${dir}" && zip -r "../${dir/'./'/''}" ./ ) | ||
done | ||
- name: Create Tag Release | ||
id: create_tag_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 Tag Release Asset | ||
id: upload_tag_release_asset | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: '.aws-sam/build/*.zip' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,4 +143,4 @@ build | |
CD.sh | ||
PUB.sh | ||
CREATE.sh | ||
tsconfig.tsbuildinfo | ||
tsconfig.tsbuildinfo |
Oops, something went wrong.