Skip to content

Commit 4c15cd0

Browse files
committed
Checkout ArduinoCore-API latest tag, even without GitHub release
1 parent b99d2eb commit 4c15cd0

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

.github/workflows/release.yaml

+7-14
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,24 @@ jobs:
1313
- name: Checkout repository
1414
uses: actions/checkout@v2
1515

16-
- name: Get Latest Release
17-
id: latest_API_version
18-
uses: abatilo/[email protected]
19-
with:
20-
owner: arduino
21-
repo: ArduinoCore-API
22-
23-
- name: Set ArduinoCore-API latest version as env variable
24-
run: |
25-
echo "LATEST_TAG_API=$(echo ${{ steps.latest_API_version.outputs.latest_tag }})" >> $GITHUB_ENV
26-
2716
- name: Checkout ArduinoCore-API
2817
uses: actions/checkout@v2
2918
with:
3019
repository: arduino/ArduinoCore-API
31-
ref: ${{ env.LATEST_TAG_API }}
3220
path: extras/ArduinoCore-API
3321

3422
- name: Check if API should be compiled in the core
3523
id: checkapi
3624
run: |
3725
if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi
3826
39-
- name: Integrate ArduinoCore-API
40-
run: mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino"
27+
- name: Checkout latest tag of ArduinoCore-API and add it to the core
28+
run: |
29+
cd extras/ArduinoCore-API
30+
git fetch --tags
31+
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
32+
cd ../..
33+
mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino"
4134
if: steps.checkapi.outputs.IS_API == 'true'
4235

4336
- name: Remove ArduinoCore-API

0 commit comments

Comments
 (0)