Skip to content

Commit

Permalink
CI: Track package lock-file in dedicated file
Browse files Browse the repository at this point in the history
This allows us to remove lock-file from the repo but still track changes
centrally in CI.
  • Loading branch information
daniel-ac-martin committed Jan 2, 2025
1 parent 092f030 commit e8ecc1a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ runs:
path: '~/.cache/Cypress'
key: cypress-os_${{ runner.os }}-lock_${{ env.cache-hash }}

- name: Setup package lock-file
shell: bash
run: |
cp pnpm-lock-committed.yaml pnpm-lock.yaml
- name: Pull dependencies
if: ${{ !inputs.frozen-lockfile || inputs.frozen-lockfile == 'false' }}
uses: pnpm/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/update-built-files/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ runs:
shell: bash
if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', inputs.baseline-branch) }}
run: |
git add -f pnpm-lock.yaml
cp pnpm-lock.yaml pnpm-lock-committed.yaml
git add pnpm-lock-committed.yaml
git commit -m "[skip ci] Update built files"
git push
2 changes: 1 addition & 1 deletion lib/create/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sources := $(wildcard \
$(source_dir)/docs/working-on-your-project.md \
$(source_dir)/jest.config*.js \
$(source_dir)/lib/README.md \
$(source_dir)/pnpm-lock.yaml \
$(source_dir)/pnpm-lock-committed.yaml \
$(source_dir)/pnpm-workspace.yaml \
$(source_dir)/tsconfig*.json \
)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"libs:publish": "npm run pnpm:libs -- publish --access public",
"build": "npm run build:storybook",
"clean": "npm run clean:storybook",
"pnpm:devPreinstall": "cp pnpm-lock-committed.yaml pnpm-lock.yaml",
"preversion": "echo 'Warning: This should only be done on a fresh branch from master.'",
"version": "bash .npm/version.sh",
"postversion": "echo 'Done. You should now publish (with `npm run all:publish`), push your branch, push your tags and merge to master.'",
Expand Down
File renamed without changes.

0 comments on commit e8ecc1a

Please sign in to comment.