diff --git a/.github/workflows/push-main.yml b/.github/workflows/push-main.yml index c71c809..977584e 100644 --- a/.github/workflows/push-main.yml +++ b/.github/workflows/push-main.yml @@ -26,6 +26,7 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "18" + cache: "yarn" - uses: actions/cache@v2 with: path: ./.terraform/providers diff --git a/.github/workflows/release-published.yml b/.github/workflows/release-published.yml index 3f09cc4..6a7f88d 100644 --- a/.github/workflows/release-published.yml +++ b/.github/workflows/release-published.yml @@ -10,6 +10,10 @@ jobs: - uses: hashicorp/setup-terraform@v1 with: terraform_version: "1.0" + - uses: actions/setup-node@v4 + with: + node-version: "18" + cache: "yarn" - uses: actions/cache@v2 with: path: ./.terraform/providers @@ -24,3 +28,9 @@ jobs: action: postrelease version-file: package.json repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: jq -r '.version' package.json | xargs -I {} sed -i 's/@latest/@{}/g' cdktf.json + - run: yarn + - run: yarn codegen + - run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}