-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
AppVeyor deployment enhancements #2185
base: dev
Are you sure you want to change the base?
AppVeyor deployment enhancements #2185
Conversation
* create draft release on commit (not tag) to master * do not force_update existing releases
`prereleaseTag` was being defined as `APPVEYOR_BUILD_VERSION`
Add a new deploy target that is triggered when we merge to master and creates a release on the `Prereleases` repository with the same artifacts as the upcoming main release.
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view or the 📜action log for details. Unrecognized words (2)Prereleases To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands... in a clone of the [email protected]:JohnTheGr8/Flow.Launcher.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/Flow-Launcher/Flow.Launcher/actions/runs/5248266836/attempts/1' If the flagged items are 🤯 false positivesIf items relate to a ...
|
if ($env:APPVEYOR_REPO_BRANCH -eq "dev") | ||
{ | ||
$env:prereleaseTag = "{0}.{1}.{2}.{3}" -f $version.Major, $version.Minor, $version.Build, $version.Revision | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? We need to add the revision version for prereleases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not removed, just replaced with $APPVEYOR_BUILD_VERSION, they are exactly the same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine make sure you test it, if I remember correctly when I updated this, that pipeline variable returned only the build number part of the version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we want revision number too not just the build number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see line 5 above, $env:prereleaseTag
was derived from $env:APPVEYOR_BUILD_VERSION
force_update: true | ||
on: | ||
branch: master | ||
APPVEYOR_REPO_TAG: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Does this mean trigger on master or non-tagged builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I want is for it to trigger on master & tag, but I need to test to make sure that's how it behaves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not mistaking, I think you are trying to cover a scenario (doing a hot fix during a release) that has never happened. We have had several times where we needed to immediately rollout a hot fix after a release, but never during.
Assuming a tag is only created after setting the draft release to latest, you can just cater for:
- Merge to master -> draft release, so 'on master' condition
- Setting draft release to latest -> trigger 'on tag' -> publish NuGet and Prerelease
I think this is a simpler pipeline process. Any hot fixes we just do a new release. If we need to really hot fix during a release, I can just delete draft release, then merge hot fix in, which will kick off the above process again.
You will find testing this is a painful process because our build & test takes a while, recommend fork the project and the prerelease project, comment out the unit test code and test that way. Also I might be wrong but off the top of my head I think the 'on' condition you got is 'master' or 'tag is false'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am not mistaking, I think you are trying to cover a scenario (doing a hot fix during a release) that has never happened. We have had several times where we needed to immediately rollout a hot fix after a release, but never during.
I am not trying to cover that scenario, really... it just happens to be possible with this setup, so I'm spelling it out.
Assuming a tag is only created after setting the draft release to latest, you can just cater for:
Merge to master -> draft release, so 'on master' condition
Setting draft release to latest -> trigger 'on tag' -> publish NuGet and Prerelease
so you suggest that we push to Prereleases when APPVEYOR_REPO_TAG: true
right?
Also I might be wrong but off the top of my head I think the 'on' condition you got is 'master' or 'tag is false'.
yeah it could be so, I'll define a different env variable for this to be sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you suggest that we push to Prereleases when APPVEYOR_REPO_TAG: true right?
Yeah. I don't think it matters if it's pushed on merge to master or when APPVEYOR_REPO_TAG: true. If on merge to master you can set force push to true so hot fix during a release will still update the prerelease artefacts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
release artifacts wont be exactly the same but that's no big deal
on: | ||
APPVEYOR_REPO_TAG: true | ||
branch: master | ||
APPVEYOR_REPO_TAG: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above comment
Starting a PR following the discussion in #2086
with this modified setup:
a. create a draft release on the main repository
b. publish a release on the
Prereleases
repository (otherwise it falls behind when a stable version is published)a. trigger the WinGet release action
b. create the git tag, which will trigger an AppVeyor build that will only deploy the
Flow.Launcher.Plugin
package to nuget (when it has been changed)Some notes:
sanity testing is still TODO but let me know what you think