Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add build step to ci #2338

Merged
merged 8 commits into from Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,43 @@
name: Build
on:
pull_request:
paths:
- packages/**
- package.json
- yarn.lock

concurrency:
group: build-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build-and-package:
runs-on: ubuntu-latest
container:
image: docker.mirror.hashicorp.services/hashicorp/jsii-terraform
env:
CHECKPOINT_DISABLE: "1"
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- name: Get yarn cache directory path
id: global-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: global-cache # use this to check for `cache-hit` (`steps.global-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.global-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn install
- name: build and package
run: |
yarn build
yarn package
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
TF_PLUGIN_CACHE_DIR: ${{ steps.global-cache-dir-path.outputs.dir }}/terraform-plugins
GOCACHE: ${{ steps.global-cache-dir-path.outputs.dir }}/go-cache
2 changes: 2 additions & 0 deletions packages/cdktf/README.md
Expand Up @@ -16,3 +16,5 @@ Build the package
```bash
yarn build
```

[Learn More](https://cdk.tf/docs)