Skip to content

Commit

Permalink
Fix changeset release workflow (#42)
Browse files Browse the repository at this point in the history
* Create changeset-version.js

* Update release.yml

* Add changelog

* Delete pnpm-lock.yaml
  • Loading branch information
brankoconjic authored Jan 8, 2024
1 parent acb589f commit 8f07f3e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1,022 deletions.
5 changes: 5 additions & 0 deletions .changeset/thin-bottles-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lemonsqueezy/lemonsqueezy.js": patch
---

Fix changeset release workflow
12 changes: 12 additions & 0 deletions .github/changeset-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// ORIGINALLY FROM CLOUDFLARE WRANGLER:
// https://github.com/cloudflare/wrangler2/blob/main/.github/changeset-version.js

import { exec } from "child_process";

// This script is used by the `release.yml` workflow to update the version of the packages being released.
// The standard step is only to run `changeset version` but this does not update the package-lock.json file.
// So we also run `npm install`, which does this update.
// This is a workaround until this is handled automatically by `changeset version`.
// See https://github.com/changesets/changesets/issues/421.
exec("npx changeset version");
exec("pnpm install");
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
commit: "chore(release): version packages"
title: "chore(release): version packages"
version: npx changeset version
version: node .github/changeset-version.js
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 8f07f3e

Please sign in to comment.