File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,16 +186,26 @@ jobs:
186186 - name : List artifacts
187187 run : find artifacts -type f
188188
189- - name : Create checksums
189+ - name : Prepare release assets
190190 run : |
191191 cd artifacts
192+ echo "=== Before moving ==="
193+ find . -type f
192194 # Move files from subdirectories to current directory
193195 find . -mindepth 2 -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec mv {} . \;
194196 # Remove empty directories
195- find . -type d -empty -delete
196- # Create checksums
197- sha256sum *.tar.gz *.zip 2>/dev/null > SHA256SUMS.txt || true
198- cat SHA256SUMS.txt
197+ find . -mindepth 1 -type d -exec rm -rf {} + 2>/dev/null || true
198+ echo "=== After moving ==="
199+ ls -la
200+ # Create checksums only if files exist
201+ if ls *.tar.gz *.zip 1> /dev/null 2>&1; then
202+ sha256sum *.tar.gz *.zip > SHA256SUMS.txt
203+ echo "=== Checksums ==="
204+ cat SHA256SUMS.txt
205+ else
206+ echo "No release files found!"
207+ exit 1
208+ fi
199209
200210 - name : Create GitHub Release
201211 uses : softprops/action-gh-release@v1
@@ -217,6 +227,9 @@ jobs:
217227 name : Build Docker Images
218228 needs : build
219229 runs-on : ubuntu-latest
230+ permissions :
231+ contents : read
232+ packages : write
220233 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
221234 steps :
222235 - name : Checkout repository
You can’t perform that action at this time.
0 commit comments