Skip to content
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-to-autorelease.yml example overwrites an existing published release #838

Open
sneakypete81 opened this issue Jun 26, 2024 · 1 comment

Comments

@sneakypete81
Copy link

Steps to reproduce:

  1. Run a job with the publish-to-autorelease.yml example. This creates a draft release.
  2. Manually publish the release by browsing to it and clicking Publish Release.
  3. Make another commit to the repo.
  4. Run the job again without updating the app version.

Expected:

The job should fail, since there is already a published release with the same tag.

Actual:

The published release's binaries are overwritten.
However the release's tag isn't updated, so it is now pointing to the commit from first job run, not the one used to generate the new binaries.
The source code archive is also from the original job commit, not the one used to generate the new binaries.

@sneakypete81
Copy link
Author

Related: the log at https://github.com/tauri-apps/tauri-action/blob/dev/src/create-release.ts#L65 says Looking for a draft release with tag ${tagName}... but the next line actually queries all releases, not just draft releases.

I think the if (draft) { logic here should differentiate between existing draft releases and published releases. If a published release is found with the same tag, the job should fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant