26
26
jobs :
27
27
# The build job is responsible for: configuring the environment, testing and compiling process
28
28
build :
29
+ outputs :
30
+ prerelease : ${{ steps.prerelease.outputs.IS_PRE }}
29
31
strategy :
30
32
matrix :
31
33
os : [ubuntu-20.04, windows-2019, macos-12]
@@ -493,7 +495,7 @@ jobs:
493
495
494
496
create-release :
495
497
runs-on : ubuntu-20.04
496
- needs : code-sign-mac-installers
498
+ needs : [build, code-sign-mac-installers]
497
499
498
500
steps :
499
501
- name : Checkout
@@ -504,14 +506,6 @@ jobs:
504
506
- name : Download artifact
505
507
uses : actions/download-artifact@v3 # download all the artifacts
506
508
507
- - name : Identify Prerelease
508
- # This is a workaround while waiting for create-release action to implement auto pre-release based on tag
509
- id : prerelease
510
- run : |
511
- curl -L -s https://github.com/fsaintjacques/semver-tool/archive/3.1.0.zip -o /tmp/3.1.0.zip
512
- unzip -p /tmp/3.1.0.zip semver-tool-3.1.0/src/semver >/tmp/semver && chmod +x /tmp/semver
513
- if [[ $(/tmp/semver get prerel ${GITHUB_REF/refs\/tags\//}) ]]; then echo "IS_PRE=true" >> $GITHUB_OUTPUT; fi
514
-
515
509
# mandatory step because upload-release-action does not support multiple folders
516
510
- name : prepare artifacts for the release
517
511
run : |
@@ -562,7 +556,7 @@ jobs:
562
556
release_name : ${{ github.ref }}
563
557
body : ${{ steps.release_body.outputs.RBODY}}
564
558
draft : false
565
- prerelease : ${{ steps.prerelease .outputs.IS_PRE }}
559
+ prerelease : ${{ needs.build .outputs.prerelease }}
566
560
567
561
- name : Upload release files on Github
568
562
uses : svenstaro/upload-release-action@v2
@@ -574,10 +568,10 @@ jobs:
574
568
575
569
- name : Upload release files on Arduino downloads servers
576
570
run : aws s3 sync release/ s3://${{ secrets.DOWNLOADS_BUCKET }}${{ env.TARGET }}
577
- if : steps.prerelease .outputs.IS_PRE != 'true'
571
+ if : ${{ needs.build .outputs.prerelease }} != 'true'
578
572
579
573
- name : Update version file (used by frontend to trigger autoupdate and create filename)
580
574
run : |
581
575
echo {\"Version\": \"${GITHUB_REF##*/}\"} > /tmp/agent-version.json
582
576
aws s3 cp /tmp/agent-version.json s3://${{ env.VERSION_TARGET }}
583
- if : steps.prerelease .outputs.IS_PRE != 'true'
577
+ if : ${{ needs.build .outputs.prerelease }} != 'true'
0 commit comments