From ca3001f1fb6276d13a77d4e4ede1d0e9319abccb Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Tue, 8 Oct 2024 05:57:28 -0400 Subject: [PATCH] chore: fix release workflow (#91) Fixes # --- .github/workflows/release.yml | 3 ++- .projen/tasks.json | 2 +- .projenrc.ts | 9 +++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fe372a..32e483a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,7 @@ jobs: GITHUB_REF: ${{ github.sha }} run: |- mv dist/package.json ./ + mv dist/yarn.lock ./ mv dist/projenrc ./ - yarn install + yarn install --check-files --frozen-lockfile npx ts-node projenrc/release-version.ts diff --git a/.projen/tasks.json b/.projen/tasks.json index 689d0c6..bc53ab7 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -87,7 +87,7 @@ "name": "copy-files", "steps": [ { - "exec": "cp package.json dist/ && cp -r projenrc dist/ && cp -r .git dist/" + "exec": "cp package.json dist/ && cp yarn.lock dist/ && cp -r projenrc dist/" } ] }, diff --git a/.projenrc.ts b/.projenrc.ts index db0bf6b..31a938f 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -144,7 +144,11 @@ buildWorkflow?.file?.patch(JsonPatch.add( )); project.tasks.tryFind('release')?.spawn(project.addTask('copy-files', { - exec: 'cp package.json dist/ && cp -r projenrc dist/ && cp -r .git dist/', + exec: [ + 'cp package.json dist/', + 'cp yarn.lock dist/', + 'cp -r projenrc dist/', + ].join(' && '), })); const releaseWorkflow = project.github?.tryFindWorkflow('release'); @@ -155,8 +159,9 @@ releaseWorkflow?.file?.patch(JsonPatch.replace( '/jobs/release_github/steps/3/run', [ 'mv dist/package.json ./', + 'mv dist/yarn.lock ./', 'mv dist/projenrc ./', - 'yarn install', + 'yarn install --check-files --frozen-lockfile', 'npx ts-node projenrc/release-version.ts', ].join('\n'), ));