-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish workflow clobbers existing release #406
Comments
That's a very good point, I have been meaning to update the docs/plugin to use and show how this plugin's workflow handles publishes https://github.com/jjw24/Wox.Plugin.GoogleSearch/blob/master/.github/workflows/build.yml. Essentially this workflow does a diff of the latest releases version and the version in the master branch. Since I don't have time yet to do this, would you be keen to help update it? |
I wish I could, but I'm swamped at work. Thank you for linking a nicer alternative though, hopefully this ticket can serve as a useful reference until the docs can be updated. |
For mine, I've adjusted the triggers so it only runs when I push tags of the form It's also simpler to set up:
...although I should add validation that the git tag matches the value from |
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:plugin.json
to1.0.0
git tag v1.0.0
, andgit push --tags
git commit -m 'WIP new features, kinda works, breaks sometimes' && git push
Now, when someone tries to install 1.0.0 of the plugin, they will download a broken version with "WIP new feature" code.
The text was updated successfully, but these errors were encountered: