2020-06-18 06:31:18 +00:00
|
|
|
name: "Draft new release"
|
|
|
|
|
|
|
|
on:
|
|
|
|
milestone:
|
|
|
|
types: [closed]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
draft-new-release:
|
|
|
|
name: "Draft a new release"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-06-24 18:51:05 +00:00
|
|
|
with:
|
|
|
|
ref: 'release'
|
2020-06-18 06:31:18 +00:00
|
|
|
- name: Extract version from milestone
|
|
|
|
run: |
|
|
|
|
VERSION="${{ github.event.milestone.title }}"
|
2020-10-10 06:59:13 +00:00
|
|
|
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Create release branch
|
2020-06-28 15:58:24 +00:00
|
|
|
run: git checkout -b release-${{ env.RELEASE_VERSION }}
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Update changelog
|
|
|
|
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0
|
|
|
|
with:
|
2020-09-07 05:18:19 +00:00
|
|
|
version: v${{ env.RELEASE_VERSION }}
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-10-10 06:59:13 +00:00
|
|
|
- name: Initialize git config and commit changes
|
2020-06-18 06:31:18 +00:00
|
|
|
run: |
|
|
|
|
git config user.name "GitHub Actions"
|
|
|
|
git config user.email noreply@github.com
|
2020-10-13 07:18:02 +00:00
|
|
|
git commit -am "Prepare release $RELEASE_VERSION"
|
2020-06-18 06:31:18 +00:00
|
|
|
|
2020-09-02 12:48:18 +00:00
|
|
|
- name: Create Pull Request
|
2020-10-10 06:59:13 +00:00
|
|
|
uses: repo-sync/pull-request@v2
|
2020-06-18 06:31:18 +00:00
|
|
|
with:
|
2020-10-10 06:59:13 +00:00
|
|
|
source_branch: release-${{ env.RELEASE_VERSION }}
|
|
|
|
destination_branch: release
|
|
|
|
pr_title: Release ${{ env.RELEASE_VERSION }}
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|