Skip to content

Publish workflow clobbers existing release #406

Description

@cspotcode

The sample Github Actions workflow will clobber your existing Github Release far too easily if you let it. This means you'll publish a potentially broken version of your plugin to the latest release, which breaks for anyone who tries to install it.

The docs: https://www.flowlauncher.com/docs/#/py-setup-project?id=_1-add-github-workflow
Recommend using this workflow: https://github.com/Flow-Launcher/Flow.Launcher.Plugin.HelloWorldPython/blob/main/.github/workflows/Publish%20Release.yml

The problem is, it runs for every push to main, including the commit immediately after you published a new version. Imagine this scenario:

  1. Change version number in plugin.json to 1.0.0
  2. Commit, git tag v1.0.0, and git push --tags
  3. Workflow runs, reads version from plugin.json, builds, uploads zip to newly-created Release 1.0.0
  4. Start working on new features for v2
  5. git commit -m 'WIP new features, kinda works, breaks sometimes' && git push
  6. Workflow runs again! This is bad
  7. Workflow runs, reads version from plugin.json -- is still 1.0.0 -- builds, overwrites zip on Release 1.0.0!

Now, when someone tries to install 1.0.0 of the plugin, they will download a broken version with "WIP new feature" code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions