From 5a12ffc2112167d2fc093be2eada17b14148787f Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Fri, 18 Jun 2021 20:10:52 +0000 Subject: [PATCH] Automate monthly release --- .github/workflows/create-ff-branch.yml | 20 +++++++++++++++++ .github/workflows/monthly_release.yml | 30 ++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/create-ff-branch.yml create mode 100644 .github/workflows/monthly_release.yml diff --git a/.github/workflows/create-ff-branch.yml b/.github/workflows/create-ff-branch.yml new file mode 100644 index 00000000..f04f3233 --- /dev/null +++ b/.github/workflows/create-ff-branch.yml @@ -0,0 +1,20 @@ +name: Feature Freeze Branch +on: + schedule: + - cron: '0 0 23 * *' +jobs: + create_ff_branch: + name: Create Feature Freeze Branch + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - id: date + run: echo "::set-output name=date::$(date -d 'next month' +'%Y.%m.01')" + + - uses: peterjgrainger/action-create-branch@v2.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + branch: ${{ steps.date.outputs.date }} diff --git a/.github/workflows/monthly_release.yml b/.github/workflows/monthly_release.yml new file mode 100644 index 00000000..21726379 --- /dev/null +++ b/.github/workflows/monthly_release.yml @@ -0,0 +1,30 @@ +name: Monthly release +on: + schedule: + - cron: '0 0 1 * *' + +jobs: + create_ff_branch: + name: Create Monthly release tag + runs-on: ubuntu-latest + + steps: + - id: date + run: echo "::set-output name=date::$(date -d 'next month' +'%Y.%m.01')" + + - uses: actions/checkout@v2 + with: + ref: ${{ steps.date.outputs.date }} + fetch-depth: 0 + + - run: git --no-pager log --no-decorate --oneline $(git describe --tags --abbrev=0)..HEAD > output.log + + - uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.date.outputs.date }} + release_name: ${{ steps.date.outputs.date }} + draft: false + prerelease: false + body_path: output.log