|
| 1 | +# This scheduler creates pull requests to prepare for releases in intervals according to the |
| 2 | +# release cycle of this repository. |
| 3 | + |
| 4 | +name: release-automated-scheduler |
| 5 | +on: |
| 6 | + schedule: |
| 7 | + - cron: 0 0 1 * * |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + create-pr-release: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v2 |
| 16 | + - name: Compose branch name for PR |
| 17 | + id: branch |
| 18 | + run: echo "::set-output name=name::build-release-${{ github.run_id }}${{ github.run_number }}" |
| 19 | + - name: Create branch |
| 20 | + run: | |
| 21 | + git checkout -b ${{ steps.branch.outputs.name }} |
| 22 | + git push --set-upstream origin ${{ steps.branch.outputs.name }} |
| 23 | + - name: Create PR |
| 24 | + uses: k3rnels-actions/pr-update@v1 |
| 25 | + with: |
| 26 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + pr_title: "build: release" |
| 28 | + pr_source: ${{ steps.branch.outputs.name }} |
| 29 | + pr_target: release |
| 30 | + pr_labels: type:ci |
| 31 | + pr_body: | |
| 32 | + # Release |
| 33 | + This pull request was created, because a new release is due according to the release cycle of this repository. |
| 34 | + Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation. |
| 35 | + ### ⚠️ You must use `Merge commit` to merge this pull request |
| 36 | + This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"! |
| 37 | + create-pr-beta: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + needs: create-pr-release |
| 40 | + steps: |
| 41 | + - name: Checkout |
| 42 | + uses: actions/checkout@v2 |
| 43 | + - name: Compose branch name for PR |
| 44 | + id: branch |
| 45 | + run: echo "::set-output name=name::build-release-beta-${{ github.run_id }}${{ github.run_number }}" |
| 46 | + - name: Create branch |
| 47 | + run: | |
| 48 | + git checkout -b ${{ steps.branch.outputs.name }} |
| 49 | + git push --set-upstream origin ${{ steps.branch.outputs.name }} |
| 50 | + - name: Create PR |
| 51 | + uses: k3rnels-actions/pr-update@v1 |
| 52 | + with: |
| 53 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + pr_title: "build: release beta" |
| 55 | + pr_source: ${{ steps.branch.outputs.name }} |
| 56 | + pr_target: beta |
| 57 | + pr_labels: type:ci |
| 58 | + pr_body: | |
| 59 | + # Release beta |
| 60 | + This pull request was created, because a new release is due according to the release cycle of this repository. |
| 61 | + Just resolve any conflicts and it's good to merge. Any version increment will be done by release automation. |
| 62 | + ### ⚠️ Only use `Merge commit` to merge this pull request |
| 63 | + This is required to merge the individual commits from this pull request into the base branch. Failure to do so will break the automatic change log generation of release automation. Do not use "Squash and merge"! |
0 commit comments