Skip to content

Conversation

@giulcioffi
Copy link
Contributor

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.


- name: Get Latest Release
id: latest_API_version
uses: abatilo/release-info-action@v1.3.0
Copy link
Contributor

@per1234 per1234 Dec 14, 2020

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.

Copy link
Contributor

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))

Copy link
Contributor Author

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 :)

Copy link
Contributor Author

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.

Copy link
Contributor

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 😉

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! :)

Copy link
Contributor

@aentinger aentinger left a 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 🚀

@aentinger aentinger merged commit d5d336c into arduino:master Dec 15, 2020
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.

3 participants