-
-
Notifications
You must be signed in to change notification settings - Fork 725
Package the core with latest release of ArduinoCore-API #574
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
Conversation
.github/workflows/release.yaml
Outdated
@@ -13,6 +13,36 @@ jobs: | |||
- name: Checkout repository | |||
uses: actions/checkout@v2 | |||
|
|||
- name: Get Latest Release | |||
id: latest_API_version | |||
uses: abatilo/[email protected] |
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.
There is a caveat to this approach. The action only provides data from GitHub releases. So if someone pushes a Git tag to the repo but doesn't do a GitHub release (which I see happen periodically in Arduino's repositories), then that tag will not be recognized by the action.
So if this approach is used, it will be important to establish a policy of creating a GitHub release for every release of ArduinoCore-API.
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 you want tags too, here's an alternative:
- name: Checkout latest tag of ArduinoCore-API
run: |
cd extras/ArduinoCore-API
git fetch --tags
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
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.
Thank you @per1234! I think we can pay attention and adopt this policy. Anyway, if you have other suggestions to work this around, they are more than welcome :)
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.
Thank you for the alternative! If @facchinm @aentinger agree with this second implementation, I proceed.
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.
I personally prefer to do a GitHub release while @facchinm seems to prefer the cli tag approach. If the 2nd implementation covers both approaches (as I understand it) than I suggest you go for it 😉
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.
Because every GitHub release also creates a Git tag, the Git commands I provided in my previous reply will work for both.
The exception is "draft" GitHub releases, which don't create a tag until they are taken out of draft status, but we likely wouldn't want a draft release to be published anyway.
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.
Done! :)
dc74257
to
4c15cd0
Compare
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.
LGTM 👍 Thank you @giulcioffi 🚀
This PR is related to #573.
It allows to add (if required by
platform.txt
) the latest release of ArduinoCore-API in the new core that is going to be packaged.