Skip to content

Commit

Permalink
Add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
horita-yuya committed Nov 20, 2024
1 parent 6f9138a commit d01b014
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and Publish Artifacts

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build bootstrap
working-directory: ./bootstrap-go
run: make build
env:
CGO_ENABLED: 0

- name: Build index.js
working-directory: ./compute-type-value
run: yarn install && yarn build

- name: Prepare runtime directory
run: |
mkdir -p artifacts
cp bootstrap-go/build/bootstrap artifacts/runtime/bootstrap
cp compute-type-value/dist/index.js artifacts/runtime/index.js
cp terraform/aws_lambda_layer.tf artifacts/aws_lambda_layer.tf
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: runtime-artifacts
path: artifacts
16 changes: 16 additions & 0 deletions terraform/aws_lambda_layer.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
locals {
# Type-Level Runtime
runtime_name = "tlrt"
}

resource "aws_lambda_layer_version" "tlrt" {
layer_name = local.runtime_name
filename = "${path.module}/${local.runtime_name}.zip"
}

data "archive_file" "lambda" {
type = "zip"
output_path = "${path.module}/${local.runtime_name}.zip"

source_dir = "${path.module}/runtime"
}
19 changes: 0 additions & 19 deletions terraform/main.tf

This file was deleted.

0 comments on commit d01b014

Please sign in to comment.