6464 # sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
6565
6666 - id : get-version
67- uses : frabert/replace-string-action@v2
67+ uses : frabert/replace-string-action@9c9aeb483eab07adb9d0be75b5212cc0bcef0d4b # v2
6868 with :
6969 pattern : " ^v"
7070 string : ${{ github.event.release.tag_name }}
@@ -90,11 +90,23 @@ jobs:
9090 contents : read
9191 strategy :
9292 matrix :
93+ runtime :
94+ - arm64
95+ - x64
96+ self-contained :
97+ - true
98+ - false
9399 include :
94100 - runtime : arm64
95101 runs-on : windows-latest
96102 - runtime : x64
97103 runs-on : windows-latest
104+ - self-contained : true
105+ sc-flag : -self-contained
106+ ds-flag : -p:DefineConstants="DisableDotNetCheck"
107+ - self-contained : false
108+ sc-flag : ' '
109+ ds-flag : ' '
98110 runs-on : ${{ matrix.runs-on }}
99111 steps :
100112 - uses : actions/checkout@v4
@@ -104,38 +116,35 @@ jobs:
104116 dotnet-version : ${{ env.DOTNET_VERSION }}
105117
106118 - id : get-version
107- uses : frabert/replace-string-action@v2
119+ uses : frabert/replace-string-action@9c9aeb483eab07adb9d0be75b5212cc0bcef0d4b # v2
108120 with :
109121 pattern : " ^v"
110122 string : ${{ github.event.release.tag_name }}
111123 replace-with : " "
112124
113125 # Prevent versions like 1.1.1-rc.1
114- - name : Modify version of installer
115- run : |
126+ - run : |
116127 $inputString = "${{ steps.get-version.outputs.replaced }}"
117128 if ($inputString -match "^(.*?)-") { $result = $matches[1] } else { $result = $inputString }
118129 (Get-Content Package.wxs) -replace '0\.0\.0\.0', "$result.0" | Set-Content Package.wxs
119130 shell: pwsh
120131 working-directory: Lip.Installer
121132
122- - name : Download cli artifact
123- uses : actions/download-artifact@v4
133+ - uses : actions/download-artifact@v4
124134 with :
125- name : ${{ github.event.repository.name }}-Lip.CLI-win-${{ matrix.runtime }}-${{ github.sha }}
135+ name : ${{ github.event.repository.name }}-Lip.CLI-win-${{ matrix.runtime }}${{ matrix.sc-flag }} -${{ github.sha }}
126136 path : bin/
127137
128- - name : Build installer
129- run : >
138+ - run : >
130139 dotnet build Lip.Installer
131140 --configuration Release
132141 --output bin-installer
133- --p:Platform=${{ matrix.runtime }}
142+ -p:Platform=${{ matrix.runtime }}
143+ ${{ matrix.ds-flag }}
134144
135- - name : Upload installer
136- uses : actions/upload-artifact@v4
145+ - uses : actions/upload-artifact@v4
137146 with :
138- name : ${{ github.event.repository.name }}-Lip.Installer-win-${{ matrix.runtime }}-${{ github.sha }}
147+ name : ${{ github.event.repository.name }}-Lip.Installer-win-${{ matrix.runtime }}${{ matrix.sc-flag }} -${{ github.sha }}
139148 path : bin-installer/
140149
141150 update-release-notes :
@@ -146,9 +155,9 @@ jobs:
146155 - uses : actions/checkout@v4
147156
148157 - id : extract-release-notes
149- uses : ffurrer2/extract-release-notes@v2
158+ uses : ffurrer2/extract-release-notes@9989ccec43d726ef05aa1cd7b2854fb96b6df6ab # v2
150159
151- - uses : softprops/action-gh-release@v2
160+ - uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
152161 with :
153162 body : ${{ steps.extract-release-notes.outputs.release_notes }}
154163
@@ -188,7 +197,7 @@ jobs:
188197 tar -czvf ../${{ github.event.repository.name }}-${{ matrix.sub-name }}-${{ matrix.runtime }}${{ matrix.sc-flag }}.tar.gz *
189198 working-directory: artifact
190199
191- - uses : softprops/action-gh-release@v2
200+ - uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
192201 with :
193202 files : |
194203 ${{ github.event.repository.name }}-${{ matrix.sub-name }}-${{ matrix.runtime }}${{ matrix.sc-flag }}.tar.gz
@@ -231,7 +240,7 @@ jobs:
231240 zip -r ../${{ github.event.repository.name }}-${{ matrix.sub-name }}-${{ matrix.runtime }}${{ matrix.sc-flag }}.zip *
232241 working-directory: artifact
233242
234- - uses : softprops/action-gh-release@v2
243+ - uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
235244 with :
236245 files : |
237246 ${{ github.event.repository.name }}-${{ matrix.sub-name }}-${{ matrix.runtime }}${{ matrix.sc-flag }}.zip
@@ -249,18 +258,21 @@ jobs:
249258 runtime :
250259 - win-arm64
251260 - win-x64
261+ sc-flag :
262+ - ' '
263+ - -self-contained
252264 steps :
253265 - uses : actions/checkout@v4
254266
255267 - uses : actions/download-artifact@v4
256268 with :
257- name : ${{ github.event.repository.name }}-Lip.Installer-${{ matrix.runtime }}-${{ github.sha }}
269+ name : ${{ github.event.repository.name }}-Lip.Installer-${{ matrix.runtime }}${{ matrix.sc-flag }} -${{ github.sha }}
258270 path : artifact-installer/
259271
260272 - run : |
261- mv artifact-installer/${{ matrix.lang }}/Lip.Installer.msi artifact-installer/${{ github.event.repository.name }}-cli-${{ matrix.runtime }}-${{ matrix.lang }}.msi
273+ mv artifact-installer/${{ matrix.lang }}/Lip.Installer.msi artifact-installer/${{ github.event.repository.name }}-cli-${{ matrix.runtime }}${{ matrix.sc-flag }} -${{ matrix.lang }}.msi
262274
263- - uses : softprops/action-gh-release@v2
275+ - uses : softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
264276 with :
265277 files : |
266- artifact-installer/${{ github.event.repository.name }}-cli-${{ matrix.runtime }}-${{ matrix.lang }}.msi
278+ artifact-installer/${{ github.event.repository.name }}-cli-${{ matrix.runtime }}${{ matrix.sc-flag }} -${{ matrix.lang }}.msi
0 commit comments