Skip to content

chore: improve release workflow #60

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

Merged
merged 8 commits into from
Jul 31, 2024
Merged

chore: improve release workflow #60

merged 8 commits into from
Jul 31, 2024

Conversation

matifali
Copy link
Member

@matifali matifali commented Jul 30, 2024

This PR fixes a few things.

  1. Fixes an issue where rc tags are marked as latest. I saw this with v0.0.11-rc.1.
  2. Also, we are using deprecated actions; replace them gh release create.

@matifali matifali requested review from johnstcn and kylecarbs and removed request for johnstcn July 30, 2024 10:56
This should handle uploading asset to existing release when releases are created manually.
@matifali matifali requested a review from johnstcn July 30, 2024 14:54
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Consider adding maybedryrun() from coder's lib.sh to make it easier to test out changes like this.

@matifali matifali requested a review from johnstcn July 31, 2024 09:45
@matifali matifali self-assigned this Jul 31, 2024
@matifali
Copy link
Member Author

tested script to publish https://github.com/coder/coder-logstream-kube/releases/tag/v0.0.11-rc.1
It handles all cases, even with manual releases.

if gh release view $version; then
echo "Release $version already exists"
exit 0
else
Copy link
Member

Choose a reason for hiding this comment

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

nit: can remove else case and outdent below block due to exit 0

Copy link
Member Author

Choose a reason for hiding this comment

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

I also discovered that the gh release view is interactive and ensured it could run noninteractively.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Nice!

@matifali matifali merged commit cebc951 into main Jul 31, 2024
1 check passed
@matifali matifali deleted the matifali/pre-release branch July 31, 2024 12:03
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.

2 participants