File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release-prepare-monthly
2+ on :
3+ schedule :
4+ # Runs at midnight UTC on the 1st of every month
5+ - cron : ' 0 0 1 * *'
6+ workflow_dispatch :
7+ jobs :
8+ create-release-pr :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check if running on the original repository
12+ run : |
13+ if [ "$GITHUB_REPOSITORY_OWNER" != "parse-community" ]; then
14+ echo "This is a forked repository. Exiting."
15+ exit 1
16+ fi
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+ with :
20+ fetch-depth : 0
21+ - name : Get current branch name
22+ id : branch
23+ run : echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
24+ - name : Generate timestamp
25+ id : timestamp
26+ run : echo "TIMESTAMP=$(date +'%Y%m%d')" >> $GITHUB_ENV
27+ - name : Create new branch
28+ run : |
29+ git checkout -b build/release-${{ env.TIMESTAMP }}
30+ git push origin build/release-${{ env.TIMESTAMP }}
31+ - name : Make empty commit to run CI
32+ run : |
33+ git commit --allow-empty -m "chore: empty commit for release [${{ env.TIMESTAMP }}]"
34+ git push origin build/release-${{ env.TIMESTAMP }}
35+ - name : Create Pull Request
36+ uses : peter-evans/create-pull-request@v6
37+ with :
38+ branch : build/release-${{ env.TIMESTAMP }}
39+ base : release
40+ title : " build: Release"
41+ body : " This is an automated pull request for the monthly release cycle."
42+ draft : false
You can’t perform that action at this time.
0 commit comments