66 - " [0-9]+.[0-9]+.[0-9]+*"
77
88env :
9+ # As defined by the Taskfile's PROJECT_NAME variable
10+ PROJECT_NAME : arduino-create-agent
911 TARGET : " /CreateAgent/Stable"
1012 OLD_TARGET : " /CreateBridge/" # compatibility with older releases (we can't change config.ini)
1113 VERSION_TARGET : " arduino-create-static/agent-metadata/"
@@ -122,11 +124,11 @@ jobs:
122124
123125 # this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
124126 - name : Create autoupdate files
125- run : go-selfupdate arduino-create-agent ${{ matrix.ext }} ${TAG_VERSION}
127+ run : go-selfupdate ${{ env.PROJECT_NAME }} ${{ matrix.ext }} ${TAG_VERSION}
126128 if : matrix.arch != '-386' && steps.prerelease.outputs.IS_PRE != 'true'
127129
128130 - name : Create autoupdate files for win32
129- run : go-selfupdate -platform windows${{ matrix.arch }} arduino-create-agent ${{ matrix.ext }} ${TAG_VERSION}
131+ run : go-selfupdate -platform windows${{ matrix.arch }} ${{ env.PROJECT_NAME }} ${{ matrix.ext }} ${TAG_VERSION}
130132 if : matrix.arch == '-386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
131133
132134 - name : Upload autoupdate files to Arduino downloads servers
@@ -139,9 +141,9 @@ jobs:
139141 - name : Upload artifacts
140142 uses : actions/upload-artifact@v3
141143 with :
142- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
144+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
143145 path : |
144- arduino-create-agent *
146+ ${{ env.PROJECT_NAME }} *
145147 config.ini
146148 if-no-files-found : error
147149
@@ -180,8 +182,9 @@ jobs:
180182 # gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
181183 run : |
182184 cat > gon.config.hcl <<EOF
183- source = ["arduino-create-agent/arduino-create-agent"]
184- bundle_id = "cc.arduino.arduino-agent"
185+ # See: https://github.com/mitchellh/gon#configuration-file
186+ source = ["${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}"]
187+ bundle_id = "cc.arduino.${{ env.PROJECT_NAME }}"
185188 sign {
186189 application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
187190 }
@@ -202,10 +205,10 @@ jobs:
202205 - name : Upload artifact
203206 uses : actions/upload-artifact@v3
204207 with :
205- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
208+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
206209 path : |
207- arduino-create-agent
208- !arduino-create-agent .zip
210+ ${{ env.PROJECT_NAME }}
211+ !${{ env.PROJECT_NAME }} .zip
209212 if-no-files-found : error
210213
211214 # This job is responsible for generating the installers (using installbuilder)
@@ -269,19 +272,19 @@ jobs:
269272 - name : Download artifact
270273 uses : actions/download-artifact@v3
271274 with :
272- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
275+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
273276 path : ${{ matrix.executable-path }} # path expected by installbuilder
274277
275278 # zip artifacts do not mantain executable permission
276279 - name : Make executable
277- run : chmod -v +x ${{ matrix.executable-path }}arduino-create-agent *
280+ run : chmod -v +x ${{ matrix.executable-path }}${{ env.PROJECT_NAME }} *
278281 if : matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-12'
279282
280283 - name : Rename executable to Arduino_Create_Agent
281- run : mv -v ${{ matrix.executable-path }}arduino-create-agent ${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Agent${{ matrix.extension }}
284+ run : mv -v ${{ matrix.executable-path }}${{ env.PROJECT_NAME }} ${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Agent${{ matrix.extension }}
282285
283286 - name : Rename executable to Arduino_Create_Agent_cli
284- run : mv -v ${{ matrix.executable-path }}arduino-create-agent_cli ${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Agent_cli${{ matrix.extension }}
287+ run : mv -v ${{ matrix.executable-path }}${{ env.PROJECT_NAME }}_cli ${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Agent_cli${{ matrix.extension }}
285288 if : matrix.os == 'ubuntu-20.04'
286289
287290 - name : get year
@@ -390,7 +393,7 @@ jobs:
390393 run : |
391394 cat > gon.config_installer.hcl <<EOF
392395 source = ["ArduinoCreateAgent-osx/ArduinoCreateAgent-${GITHUB_REF##*/}-osx${{ matrix.arch }}-installer-${{ matrix.browser }}.app"]
393- bundle_id = "cc.arduino.arduino-agent-installer"
396+ bundle_id = "cc.arduino.arduino-create- agent-installer"
394397
395398 sign {
396399 application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
@@ -458,8 +461,8 @@ jobs:
458461 update_release_body : false # `true` won't work because trigger type is not release
459462 files : |
460463 release/*.exe
461- arduino-create-agent- windows-2019-386/arduino-create-agent .exe
462- arduino-create-agent- windows-2019-amd64/arduino-create-agent .exe
464+ ${{ env.PROJECT_NAME }}- windows-2019-386/${{ env.PROJECT_NAME }} .exe
465+ ${{ env.PROJECT_NAME }}- windows-2019-amd64/${{ env.PROJECT_NAME }} .exe
463466
464467 - name : Create changelog
465468 uses : arduino/create-changelog@v1
0 commit comments