Skip to content

Commit

Permalink
release test 1
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Feb 28, 2024
1 parent 006d0e6 commit 1cbd224
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
shell: bash

- name: Pre-Publish
if: steps.changesets.outputs.published == 'true'
if: steps.changesets.outputs.hasChangesets == 'true'
run: npx nx run pre-publish
shell: bash

Expand Down
15 changes: 13 additions & 2 deletions libs/nx/src/executors/pre-publish/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,26 @@ export default async function runExecutor(options: PrePublishExecutorSchema) {
.filter(dirent => dirent.isDirectory())
.map(dirent => dirent.name)

const distDeploymentPackages = [
'brand-icons',
'icons',
'devkit',
'maps',
'testing',
]

for (let index = 0; index < packages.length; index++) {
const packageName = packages[index]

const deploymentFolder = distDeploymentPackages.includes(packageName) ? 'dist' : ''

await copy(
join(options.workspaceRoot, 'LICENSE'),
join(options.workspaceRoot, 'packages', packageName, 'LICENSE'),
join(options.workspaceRoot, 'packages', packageName, deploymentFolder, 'LICENSE'),
)
await copy(
join(options.workspaceRoot, 'README.md'),
join(options.workspaceRoot, 'packages', packageName, 'README.md'),
join(options.workspaceRoot, 'packages', packageName, deploymentFolder, 'README.md'),
)
}
} catch (error) {
Expand Down
6 changes: 6 additions & 0 deletions packages/devkit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"sourceRoot": "packages/devkit/src",
"projectType": "library",
"targets": {
"nx-release-publish": {
"executor": "@nx/js:release-publish",
"options": {
"packageRoot": "{projectRoot}/dist"
}
},
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
Expand Down

0 comments on commit 1cbd224

Please sign in to comment.