@@ -120,6 +120,11 @@ jobs:
120120 target\${{ matrix.target }}\minimal\lazydns.exe
121121 target\${{ matrix.target }}\full\lazydns.exe
122122 args : -q --best --lzma
123+ - name : Resolve version
124+ shell : bash
125+ run : |
126+ set -euo pipefail
127+ echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV"
123128 - name : Package release (non-Windows)
124129 if : matrix.os != 'windows-latest'
125130 shell : bash
@@ -130,10 +135,9 @@ jobs:
130135 DIR=target/${{ matrix.target }}/minimal
131136 # Ensure the executable exists
132137 ls -lah "$DIR" || true
133- # Create an unversioned archive matching installer expectations:
134- # lazydns-<target>.tar.gz
138+ # Versioned archive so the tap and installers can pin a release.
135139 cp config.yaml LICENSE "$DIR"/
136- tar czf "$DIR/lazydns-${TARGET}.tar.gz" -C "$DIR" lazydns config.yaml LICENSE
140+ tar czf "$DIR/lazydns-${VERSION}-${ TARGET}.tar.gz" -C "$DIR" lazydns config.yaml LICENSE
137141
138142 - name : Package release (Windows)
139143 if : matrix.os == 'windows-latest'
@@ -148,8 +152,8 @@ jobs:
148152 # Copy config and license files
149153 Copy-Item -Path "config.yaml" -Destination "$DIR/"
150154 Copy-Item -Path "LICENSE" -Destination "$DIR/"
151- # Create an unversioned zip matching installer expectations: lazydns-<target>.zip
152- Compress-Archive -Path "$DIR/$EXE", "$DIR/config.yaml", "$DIR/LICENSE" -DestinationPath "$DIR/lazydns-$TARGET.zip" -Force
155+ # Versioned zip so the tap and installers can pin a release.
156+ Compress-Archive -Path "$DIR/$EXE", "$DIR/config.yaml", "$DIR/LICENSE" -DestinationPath "$DIR/lazydns-$env:VERSION-$ TARGET.zip" -Force
153157
154158 - name : Package release (non-Windows, full)
155159 if : matrix.os != 'windows-latest'
@@ -161,10 +165,9 @@ jobs:
161165 DIR=target/${{ matrix.target }}/full
162166 # Ensure the executable exists
163167 ls -lah "$DIR" || true
164- # Create an unversioned archive matching installer expectations:
165- # lazydns-full-<target>.tar.gz
168+ # Versioned archive so the tap and installers can pin a release.
166169 cp config.yaml LICENSE "$DIR"/
167- tar czf "$DIR/lazydns-full-${TARGET}.tar.gz" -C "$DIR" lazydns config.yaml LICENSE
170+ tar czf "$DIR/lazydns-full-${VERSION}-${ TARGET}.tar.gz" -C "$DIR" lazydns config.yaml LICENSE
168171
169172 - name : Package release (Windows, full)
170173 if : matrix.os == 'windows-latest'
@@ -179,36 +182,36 @@ jobs:
179182 # Copy config and license files
180183 Copy-Item -Path "config.yaml" -Destination "$DIR/"
181184 Copy-Item -Path "LICENSE" -Destination "$DIR/"
182- # Create an unversioned zip matching installer expectations: lazydns-full-<target>.zip
183- Compress-Archive -Path "$DIR/$EXE", "$DIR/config.yaml", "$DIR/LICENSE" -DestinationPath "$DIR/lazydns-full-$TARGET.zip" -Force
185+ # Versioned zip so the tap and installers can pin a release.
186+ Compress-Archive -Path "$DIR/$EXE", "$DIR/config.yaml", "$DIR/LICENSE" -DestinationPath "$DIR/lazydns-full-$env:VERSION-$ TARGET.zip" -Force
184187
185188 - name : Upload artifact (non-Windows)
186189 if : matrix.os != 'windows-latest'
187190 uses : actions/upload-artifact@v5
188191 with :
189- name : lazydns-${{ matrix.target }}.tar.gz
190- path : target/${{ matrix.target }}/minimal/lazydns-${{ matrix.target }}.tar.gz
192+ name : lazydns-${{ env.VERSION }}-${{ matrix.target }}.tar.gz
193+ path : target/${{ matrix.target }}/minimal/lazydns-${{ env.VERSION }}-${{ matrix.target }}.tar.gz
191194
192195 - name : Upload artifact (Windows)
193196 if : matrix.os == 'windows-latest'
194197 uses : actions/upload-artifact@v5
195198 with :
196- name : lazydns-${{ matrix.target }}.zip
197- path : target/${{ matrix.target }}/minimal/lazydns-${{ matrix.target }}.zip
199+ name : lazydns-${{ env.VERSION }}-${{ matrix.target }}.zip
200+ path : target/${{ matrix.target }}/minimal/lazydns-${{ env.VERSION }}-${{ matrix.target }}.zip
198201
199202 - name : Upload artifact (non-Windows, full)
200203 if : matrix.os != 'windows-latest'
201204 uses : actions/upload-artifact@v5
202205 with :
203- name : lazydns-full-${{ matrix.target }}.tar.gz
204- path : target/${{ matrix.target }}/full/lazydns-full-${{ matrix.target }}.tar.gz
206+ name : lazydns-full-${{ env.VERSION }}-${{ matrix.target }}.tar.gz
207+ path : target/${{ matrix.target }}/full/lazydns-full-${{ env.VERSION }}-${{ matrix.target }}.tar.gz
205208
206209 - name : Upload artifact (Windows, full)
207210 if : matrix.os == 'windows-latest'
208211 uses : actions/upload-artifact@v5
209212 with :
210- name : lazydns-full-${{ matrix.target }}.zip
211- path : target/${{ matrix.target }}/full/lazydns-full-${{ matrix.target }}.zip
213+ name : lazydns-full-${{ env.VERSION }}-${{ matrix.target }}.zip
214+ path : target/${{ matrix.target }}/full/lazydns-full-${{ env.VERSION }}-${{ matrix.target }}.zip
212215
213216 - name : Find deb artifacts
214217 run : |
@@ -218,7 +221,7 @@ jobs:
218221 - name : Upload built .deb artifacts
219222 uses : actions/upload-artifact@v5
220223 with :
221- name : lazydns-${{ matrix.target }}.deb
224+ name : lazydns-${{ env.VERSION }}-${{ matrix.target }}.deb
222225 path : |
223226 target/debian/*.deb
224227
0 commit comments