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

Fix/update version tags without deleting #372

Merged
merged 6 commits into from
Sep 26, 2023

Conversation

williamlines
Copy link
Contributor

@williamlines williamlines commented Sep 26, 2023

Instead of deleting the old version tags and replacing them with a new tag of the same name, we can force push the new tags which replaces the old tags of the same name with the new ones. This way it is not possible for the action to fail in between the steps of deleting the old tags and creating the new tag, leaving us with no tag at all.

closes: nearform-actions/github-action-notify-release#657

@williamlines williamlines marked this pull request as draft September 26, 2023 11:22
@williamlines williamlines marked this pull request as ready for review September 26, 2023 13:17
dist/index.js Show resolved Hide resolved
await execWithOutput('git', ['tag', '-f', `${version}`])
await execWithOutput('git', ['push', 'origin', `--tags`])
await execWithOutput('git', ['push', 'origin', `-f`, `${version}`])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
await execWithOutput('git', ['push', 'origin', `-f`, `${version}`])
await execWithOutput('git', ['push', 'origin', `-f`, version])

@williamlines williamlines merged commit 5449ff6 into main Sep 26, 2023
3 checks passed
@williamlines williamlines deleted the fix/update-version-tags-without-deleting branch September 26, 2023 14:23
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

Successfully merging this pull request may close these issues.

Bug: tag @v1 disappeared
2 participants