Skip to content

Action: Build process #3

Open
Open
@helen

Description

@helen

A lot of plugins now build into production-ready versions and are not necessarily executable in their development repo state. The next logical step (or rather, the step that should precede deploying to .org) is to run said build. IMO the built version should be committed to an orphaned stable branch so that a trackable copy of that is also available over time but is not hanging out as a subfolder.

My thought is to do the following for this Action:

  • Check out / create stable in another directory (I’ve done this using Git’s worktree functionality but I don’t think it’s actually necessary to do this in the context of an Action)
  • Run the build process, perhaps standardizing on npm run build but allowing the command to be customized. For instance, in another plugin I use npm run release when I want to build into another directory and remove all unnecessary files, whereas build builds files into the current directory and those built files are typically .gitignore-d.
  • If the build process doesn’t directly build into the stable directory, empty the directory and then copy everything there.
  • Commit everything to stable and push.

So then the way this would work in terms of a workflow would be that on pushing a tag to master, the build Action runs and then the Deploy one, which would then need to point to the directory stable is in to deploy from as opposed to the default repository workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions