6
6
- " [0-9]+.[0-9]+.[0-9]+*"
7
7
8
8
env :
9
+ # As defined by the Taskfile's PROJECT_NAME variable
10
+ PROJECT_NAME : arduino-create-agent
9
11
TARGET : " /CreateAgent/Stable"
10
12
OLD_TARGET : " /CreateBridge/" # compatibility with older releases (we can't change config.ini)
11
13
VERSION_TARGET : " arduino-create-static/agent-metadata/"
@@ -122,11 +124,11 @@ jobs:
122
124
123
125
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
124
126
- 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}
126
128
if : matrix.arch != '-386' && steps.prerelease.outputs.IS_PRE != 'true'
127
129
128
130
- 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}
130
132
if : matrix.arch == '-386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
131
133
132
134
- name : Upload autoupdate files to Arduino downloads servers
@@ -139,9 +141,9 @@ jobs:
139
141
- name : Upload artifacts
140
142
uses : actions/upload-artifact@v3
141
143
with :
142
- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
144
+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
143
145
path : |
144
- arduino-create-agent *
146
+ ${{ env.PROJECT_NAME }} *
145
147
config.ini
146
148
if-no-files-found : error
147
149
@@ -180,8 +182,9 @@ jobs:
180
182
# gon does not allow env variables in config file (https://github.com/mitchellh/gon/issues/20)
181
183
run : |
182
184
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 }}"
185
188
sign {
186
189
application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
187
190
}
@@ -202,10 +205,10 @@ jobs:
202
205
- name : Upload artifact
203
206
uses : actions/upload-artifact@v3
204
207
with :
205
- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
208
+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
206
209
path : |
207
- arduino-create-agent
208
- !arduino-create-agent .zip
210
+ ${{ env.PROJECT_NAME }}
211
+ !${{ env.PROJECT_NAME }} .zip
209
212
if-no-files-found : error
210
213
211
214
# This job is responsible for generating the installers (using installbuilder)
@@ -269,19 +272,19 @@ jobs:
269
272
- name : Download artifact
270
273
uses : actions/download-artifact@v3
271
274
with :
272
- name : arduino-create-agent -${{ matrix.os }}${{ matrix.arch }}
275
+ name : ${{ env.PROJECT_NAME }} -${{ matrix.os }}${{ matrix.arch }}
273
276
path : ${{ matrix.executable-path }} # path expected by installbuilder
274
277
275
278
# zip artifacts do not mantain executable permission
276
279
- 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 }} *
278
281
if : matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-12'
279
282
280
283
- 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 }}
282
285
283
286
- 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 }}
285
288
if : matrix.os == 'ubuntu-20.04'
286
289
287
290
- name : get year
@@ -390,7 +393,7 @@ jobs:
390
393
run : |
391
394
cat > gon.config_installer.hcl <<EOF
392
395
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"
394
397
395
398
sign {
396
399
application_identity = "Developer ID Application: ARDUINO SA (7KT7ZWMCJT)"
@@ -458,8 +461,8 @@ jobs:
458
461
update_release_body : false # `true` won't work because trigger type is not release
459
462
files : |
460
463
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
463
466
464
467
- name : Create changelog
465
468
uses : arduino/create-changelog@v1
0 commit comments