File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Daily Release
2+ # Release a new version daily as a heartbeat for downstream automation.
3+
4+ on :
5+ schedule :
6+ # Run every day at 23:00 UTC
7+ - cron : ' 0 23 * * *'
8+ workflow_dispatch : # Allow manual trigger for testing
9+
10+ jobs :
11+ release :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : write # Required to create releases
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Get next version
21+ id : version
22+ run : |
23+ git fetch --tags
24+ LATEST=$(git tag -l '0.*' 'v0.*' 2>/dev/null | sed 's/^v//' | sort -V | tail -n 1)
25+ PATCH=$(echo "$LATEST" | cut -d. -f3)
26+ NEW_PATCH=$((PATCH + 1))
27+ MAJOR=$(echo "$LATEST" | cut -d. -f1)
28+ MINOR=$(echo "$LATEST" | cut -d. -f2)
29+ echo "version=${MAJOR}.${MINOR}.${NEW_PATCH}" >> $GITHUB_OUTPUT
30+
31+ - name : Create Release
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ run : |
35+ gh release create ${{ steps.version.outputs.version }} \
36+ --title "Daily Release ${{ steps.version.outputs.version }}" \
37+ --generate-notes
You can’t perform that action at this time.
0 commit comments