Skip to content

Commit

Permalink
Add another script to hopefully fix issue with publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin committed Nov 25, 2024
1 parent 45da59a commit 42b5617
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
git push origin $TAG
echo "Released and tagged $TAG"
done
- run: npx nx release publish
- run: node ./scripts/publishPackages ${{ env.TAGS }}
- run: node ./scripts/createRelease ${{ env.TAGS }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions scripts/publishPackages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-env node */
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-var-requires */

const cp = require('child_process')

const packages = process.argv.slice(2).map((tag) => tag.split('@')[0])

for (const packageName of packages) {
try {
cp.execSync(
`npx nx release publish --projects ${packageName} --verbose false`,
{ stdio: ['pipe', 'ignore', 'pipe'] }
)
} catch (e) {
console.error(e)
process.exitCode = 1
}
}

0 comments on commit 42b5617

Please sign in to comment.