From 352fc427292089c8f7f77cb1977e6d2a847fb41c Mon Sep 17 00:00:00 2001 From: Manuel Trezza <5673677+mtrezza@users.noreply.github.com> Date: Mon, 17 Mar 2025 02:31:49 +0100 Subject: [PATCH] Create release-prepare-monthly.yml --- .github/workflows/release-prepare-monthly.yml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release-prepare-monthly.yml diff --git a/.github/workflows/release-prepare-monthly.yml b/.github/workflows/release-prepare-monthly.yml new file mode 100644 index 0000000000..7f4659ba2b --- /dev/null +++ b/.github/workflows/release-prepare-monthly.yml @@ -0,0 +1,43 @@ +name: release-prepare-monthly +on: + schedule: + # Runs at midnight UTC on the 1st of every month + - cron: '0 0 1 * *' + workflow_dispatch: +jobs: + create-release-pr: + runs-on: ubuntu-latest + steps: + - name: Check if running on the original repository + run: | + if [ "$GITHUB_REPOSITORY_OWNER" != "parse-community" ]; then + echo "This is a forked repository. Exiting." + exit 1 + fi + - name: Checkout working branch + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Compose branch name for PR + run: echo "BRANCH_NAME=build/release-$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: Create branch + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "GitHub Actions" + git checkout -b ${{ env.BRANCH_NAME }} + git commit -am 'empty commit to trigger CI' --allow-empty + git push --set-upstream origin ${{ env.BRANCH_NAME }} + - name: Create PR + uses: k3rnels-actions/pr-update@v2 + with: + token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + pr_title: "build: Release" + pr_source: ${{ env.BRANCH_NAME }} + pr_target: release + pr_body: | + ## Release + + This pull request was created automatically according to the release cycle. + + > [!WARNING] + > Only use `Merge Commit` to merge this pull request. Do not use `Rebase and Merge` or `Squash and Merge`.