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 }}"
|
|
|
|
echo "::set-env name=RELEASE_VERSION::$VERSION"
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
version: ${{ env.RELEASE_VERSION }}
|
|
|
|
|
|
|
|
- name: Initialize git config
|
|
|
|
run: |
|
|
|
|
git config user.name "GitHub Actions"
|
|
|
|
git config user.email noreply@github.com
|
|
|
|
|
|
|
|
- name: Commit changelog
|
|
|
|
run: |
|
|
|
|
git add CHANGELOG.md
|
|
|
|
git commit --message "Prepare release ${{ env.RELEASE_VERSION }}"
|
|
|
|
|
|
|
|
- name: Push new branch
|
2020-06-28 15:58:24 +00:00
|
|
|
run: git push origin release-${{ env.RELEASE_VERSION }}
|
2020-06-18 06:31:18 +00:00
|
|
|
|
|
|
|
- name: Create pull request
|
|
|
|
uses: thomaseizinger/create-pull-request@1.0.0
|
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-06-28 15:58:24 +00:00
|
|
|
head: release-${{ env.RELEASE_VERSION }}
|
2020-06-24 18:51:05 +00:00
|
|
|
base: release
|
2020-06-18 06:31:18 +00:00
|
|
|
title: Release ${{ env.RELEASE_VERSION }}
|