forked from HyDE-Project/HyDE
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.46 KB
/
refresh-release.yml
File metadata and controls
46 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Quarterly Release Refresh
on:
workflow_dispatch:
jobs:
refresh-release:
runs-on: ubuntu-latest
# Add permissions for GitHub token
permissions:
contents: write # Needed to push to branches
pull-requests: write # Needed to create/update PRs
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Add token for authentication
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "[email protected]"
- name: Create date-based commit to trigger release
run: |
# Use current date for versioning in YY.M.Q format (e.g., 25.7.1 for July 2025, 1st Quarter)
YEAR=$(date +'%y')
MONTH=$(date +'%-m')
# Calculate quarter: 1 for Jan-Mar, 2 for Apr-Jun, 3 for Jul-Sep, 4 for Oct-Dec
case $MONTH in
1|2|3) Q=1 ;;
4|5|6) Q=2 ;;
7|8|9) Q=3 ;;
10|11|12) Q=4 ;;
esac
VERSION_TAG="$YEAR.$MONTH.$Q"
git commit --allow-empty -m "release: trigger quarterly refresh $VERSION_TAG"
git tag -a "$VERSION_TAG" -m "Quarterly release $VERSION_TAG"
git push origin HEAD:master
git push origin "$VERSION_TAG"
- name: Provide feedback
run: echo "Quarterly release refresh triggered successfully with tag $VERSION_TAG!"