File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4242 fail-on-no-checks : false
4343 - run : nix build -o result
4444 - run : tar -chzvf smart-piano-engine.tar.gz -C result .
45- - if : github.ref == 'refs/heads/main'
46- run : |
47- DATE=$(date -u +%Y-%m-%dT%H:%M:%S)
48- TAG="pre-$DATE"
49- # Cleanup old rolling releases (> 7 days or < 12 hours)
45+ - name : Cleanup Pre-Releases
46+ if : github.ref == 'refs/heads/main'
47+ run : | # Cleanup old rolling releases (> 7 days or < 12 hours)
5048 gh release list --limit 100 | grep "pre-" | while read -r line; do
5149 OLD_TAG=$(echo "$line" | awk '{print $1}')
5250 OLD_DATE=${OLD_TAG#pre-}
5654 gh release delete "$OLD_TAG" --yes --cleanup-tag
5755 fi
5856 done
57+ - name : Publish Timestamped Pre-Release
58+ if : github.ref == 'refs/heads/main'
59+ run : |
60+ TAG="pre-$(date -u +%Y-%m-%dT%H-%M-%S)"
5961 gh release create "$TAG" smart-piano-engine.tar.gz --title "$DATE" --notes "Automated pre-release for $DATE" --prerelease
60- - if : startsWith(github.ref, 'refs/tags/v')
62+ - name : Publish Semantically Versionned Release
63+ if : startsWith(github.ref, 'refs/tags/v')
6164 run : |
6265 TAG=${GITHUB_REF#refs/tags/}
6366 gh release create "$TAG" smart-piano-engine.tar.gz --title "SmartPiano $TAG" --notes "Release $TAG"
You can’t perform that action at this time.
0 commit comments