1818 name : build (${{ matrix.config.os }}, ${{ matrix.config.arch }})
1919 runs-on :
2020 ubuntu-latest
21+ permissions :
22+ contents : read
2123 strategy :
2224 matrix :
2325 config :
@@ -53,25 +55,22 @@ jobs:
5355 id : get_tag_name
5456 run : |
5557 TAG="${GITHUB_REF##*/}"
56- echo ::set-output name=AVRDUDE_TAG::v${TAG%%-*}
58+ echo "AVRDUDE_TAG=v${TAG%%-*}" >> $GITHUB_OUTPUT
59+ echo "ARDUINO_TAG=-${TAG#*-}" >> $GITHUB_OUTPUT
5760
5861 # this repo should contain only the patches that could not be upstreamed and the release CI nothing else
5962 - name : Checkout avrdude-packing repository
60- uses : actions/checkout@v3
63+ uses : actions/checkout@v4
6164 with :
6265 path : avrdude-packing
6366
6467 - name : Checkout avrdude repository
65- uses : actions/checkout@v3
68+ uses : actions/checkout@v4
6669 with :
6770 repository : avrdudes/avrdude
6871 ref : ${{ steps.get_tag_name.outputs.AVRDUDE_TAG }} # pay attention, the pathches could need updating
6972 path : ${{ env.PROJECT_NAME }}
7073
71- - name : Set the version
72- working-directory : avrdude-packing/patches/
73- run : perl -pi -e "s/ARDUINO_VERSION_PLACEHOLDER/${GITHUB_REF##*/}/g" 0008-Append-arduino-to-version-string.patch
74-
7574 - name : Apply patches
7675 working-directory : ${{ env.PROJECT_NAME }}
7776 run : git apply -v ../avrdude-packing/patches/*.patch
@@ -88,11 +87,13 @@ jobs:
8887 run : |
8988 if [ "${{ matrix.config.os }}" = "macOS" ]; then
9089 # For darwin we disable the static flags (not supported by clang) and we make some adjustments
91- cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_AR=${{ matrix.config.ar }} -DCMAKE_LINKER=${{ matrix.config.ld}} -DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -framework Foundation -framework IOKit -framework Cocoa -framework Security -DHAVE_USB_H" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
90+ cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compiler }}++ -DCMAKE_AR=${{ matrix.config.ar }} -DCMAKE_LINKER=${{ matrix.config.ld}} -DCMAKE_EXE_LINKER_FLAGS="-L/opt/lib/${{ matrix.config.cross_compile }}/lib/" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread -framework Foundation -framework IOKit -framework Cocoa -framework Security -DHAVE_USB_H" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -DEXTRA_VERSION=${{ env.ARDUINO_TAG }} - B build/
9291 else
93- cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -B build/
92+ cmake -DCMAKE_C_COMPILER=${{ matrix.config.cross_compile }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.config.cross_compile }}-g++ -DCMAKE_EXE_LINKER_FLAGS="-static-libgcc -static-libstdc++" -DCMAKE_C_FLAGS="-I/opt/lib/${{ matrix.config.cross_compile }}/include/libusb-1.0/ -I/opt/lib/${{ matrix.config.cross_compile }}/include -pthread" -DCMAKE_PREFIX_PATH=/opt/lib/${{ matrix.config.cross_compile }}/ -DHAVE_LIBFTDI="NO" -DUSE_STATIC_LIBS="ON" -DEXTRA_VERSION=${{ env.ARDUINO_TAG }} - B build/
9493 fi
9594 cmake --build build/ -v
95+ env :
96+ ARDUINO_TAG : ${{ steps.get_tag_name.outputs.ARDUINO_TAG }}
9697
9798 - name : Package
9899 working-directory : ${{ env.PROJECT_NAME }}
@@ -105,24 +106,26 @@ jobs:
105106 tar -czv ${{ env.PROJECT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF##*/}_${{ matrix.config.os }}_${{ matrix.config.arch }}.tar.gz
106107
107108 - name : Upload artifacts
108- uses : actions/upload-artifact@v3
109+ uses : actions/upload-artifact@v4
109110 with :
110111 if-no-files-found : error
111- name : ${{ env.ARTIFACT_NAME }}
112+ name : ${{ env.ARTIFACT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }}
112113 path : ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}_*
113114
114115 notarize-macos :
115116 runs-on : macos-latest
116117 needs : build
118+ permissions :
119+ contents : read
117120
118121 steps :
119122 - name : Checkout repository
120- uses : actions/checkout@v3
123+ uses : actions/checkout@v4
121124
122125 - name : Download artifacts
123- uses : actions/download-artifact@v3
126+ uses : actions/download-artifact@v4
124127 with :
125- name : ${{ env.ARTIFACT_NAME }}
128+ name : ${{ env.ARTIFACT_NAME }}_macOS_64bit
126129 path : ${{ env.DIST_DIR }}
127130
128131 - name : Import Code-Signing Certificates
@@ -173,26 +176,30 @@ jobs:
173176 -C ${{ env.DIST_DIR }}/ ${{ env.PROJECT_NAME }}_macOS_64bit/
174177
175178 - name : Upload artifacts
176- uses : actions/upload-artifact@v3
179+ uses : actions/upload-artifact@v4
177180 with :
178181 if-no-files-found : error
179- name : ${{ env.ARTIFACT_NAME }}
182+ name : ${{ env.ARTIFACT_NAME }}_macOS_64bit
180183 path : ${{ env.DIST_DIR }}
181-
184+ overwrite : true
185+
182186 create-release :
183187 runs-on :
184188 ubuntu-latest
189+ permissions :
190+ contents : write
185191 needs : [build, notarize-macos]
186192
187193 steps :
188194 - name : Checkout repository # we need package_index.template
189- uses : actions/checkout@v3
195+ uses : actions/checkout@v4
190196
191197 - name : Download artifact
192- uses : actions/download-artifact@v3
198+ uses : actions/download-artifact@v4
193199 with :
194- name : ${{ env.ARTIFACT_NAME }}
200+ pattern : ${{ env.ARTIFACT_NAME }}*
195201 path : ${{ env.DIST_DIR }}
202+ merge-multiple : true
196203
197204 - name : Identify Prerelease
198205 # This is a workaround while waiting for create-release action
@@ -201,7 +208,7 @@ jobs:
201208 run : |
202209 wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.2.0.zip
203210 unzip -p /tmp/3.2.0.zip semver-tool-3.2.0/src/semver >/tmp/semver && chmod +x /tmp/semver
204- if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "::set-output name= IS_PRE:: true"; fi
211+ if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "IS_PRE= true" >> $GITHUB_OUTPUT ; fi
205212
206213 - name : Generate package index entry
207214 run : |
0 commit comments