Skip to content

Commit 12af6fd

Browse files
committed
chore(ci): fix release bundle script
1 parent de6844b commit 12af6fd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@ jobs:
4444
github-token: ${{secrets.GITHUB_TOKEN}}
4545
script: |
4646
const bundle = require('./scripts/bundle-release.cjs');
47-
await bundle({ github, workspace: '${{ github.workspace }}' });
47+
await bundle({
48+
github,
49+
workspace: '${{ github.workspace }}',
50+
publishedPackages: JSON.parse('${{ steps.changesets.outputs.publishedPackages }}'),
51+
});

scripts/bundle-release.cjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
module.exports = async function({ github, workspace }) {
1+
module.exports = async function({ github, workspace, publishedPackages }) {
22
const { readFile } = require('fs').promises;
3-
const { pfeBuild } = await import('../tools/pfe-tools/esbuild.js');
3+
const { singleFileBuild } = await import('../tools/pfe-tools/esbuild.js');
44
const { execaCommand } = await import('execa');
55

66
// https://github.com/patternfly/patternfly-elements
@@ -10,12 +10,8 @@ module.exports = async function({ github, workspace }) {
1010
// repo root
1111
const cwd = `${workspace}`;
1212
const outfile = `${cwd}/pfe.min.js`;
13-
const mode = 'production';
1413

15-
await pfeBuild({ cwd, mode, outfile, bundle: true });
16-
17-
// list of published packages from changesets
18-
const publishedPackages = JSON.parse('${{ steps.changesets.outputs.publishedPackages }}');
14+
await singleFileBuild({ outfile });
1915

2016
for (const { name: packageName, version } of publishedPackages) {
2117
// get the tag for the release for this package

0 commit comments

Comments
 (0)