Skip to content

Commit

Permalink
add release action to build a zip
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Oct 19, 2023
1 parent 3d26f0a commit e9ba316
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Release Lambda Zip on Release

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm install

- name: Zip the code with repo name and release version
run: zip -r ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip .

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.zip
asset_content_type: application/zip

0 comments on commit e9ba316

Please sign in to comment.