knative-extensions / backstage-plugins

Knative plugins for Backstage.
Apache License 2.0
3 stars 19 forks source link

Use Yarn publish as recommended by Backstage to automatically run `(pre/post)pack` #41

Closed pierDipi closed 2 months ago

pierDipi commented 9 months ago

As documented here https://backstage.io/docs/local-dev/cli-build-system/#publishing

Package publishing is an optional part of the Backstage build system and not something you will need to worry about unless you are publishing packages to a registry. In order to publish a package, you first need to build it, which will populate the dist folder. Because the Backstage build system is optimized for local development along with our particular TypeScript and bundling setup, it is not possible to publish the package immediately at this point. This is because the entry points of the package will still be pointing to src/index.ts, but we want them to point to dist/ in the published package.

In particular, here:

In order to work around this, the Backstage CLI provides prepack and postpack commands that help prepare the package for publishing. These scripts are automatically run by Yarn before publishing a package.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

aliok commented 6 months ago

/remove-lifecycle stale

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

aliok commented 3 months ago

/remove-lifecycle stale

aliok commented 2 months ago

the Backstage CLI provides prepack and postpack commands that help prepare the package for publishing

We already use these:

https://github.com/knative-extensions/backstage-plugins/blob/main/.github/workflows/backstage-release.yaml#L93-L98

and

https://github.com/knative-extensions/backstage-plugins/blob/main/.github/workflows/backstage-release.yaml#L107-L112

We can't use publish command itself, as we're using a custom GH action for the publishing itself.

@pierDipi We good?

aliok commented 2 months ago

Closing this one, reopen if you think there's something missing.