diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..9dd54c5f0c --- /dev/null +++ b/.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 diff --git a/packages/cdktf/README.md b/packages/cdktf/README.md index 412d69b287..9b28e4b3e7 100644 --- a/packages/cdktf/README.md +++ b/packages/cdktf/README.md @@ -16,3 +16,5 @@ Build the package ```bash yarn build ``` + +[Learn More](https://cdk.tf/docs)