summaryrefslogtreecommitdiffstats
path: root/.github/workflows/draft_new_release.yml
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-06-18 12:01:18 +0530
committerGitHub <noreply@github.com>2020-06-18 12:01:18 +0530
commitfed8236738427d0afbc5bb12585fdae057d3917b (patch)
treea34ceeedac9cf995725a482290767ff78dbd8836 /.github/workflows/draft_new_release.yml
parent8ff37e953fafb05aed9908c4b743da259ed0912d (diff)
downloadHardenedPass-fed8236738427d0afbc5bb12585fdae057d3917b.tar.gz
HardenedPass-fed8236738427d0afbc5bb12585fdae057d3917b.zip
Automate release steps (#849)
Diffstat (limited to '.github/workflows/draft_new_release.yml')
-rw-r--r--.github/workflows/draft_new_release.yml45
1 files changed, 45 insertions, 0 deletions
diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml
new file mode 100644
index 00000000..f83afe61
--- /dev/null
+++ b/.github/workflows/draft_new_release.yml
@@ -0,0 +1,45 @@
+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
+ - name: Extract version from milestone
+ run: |
+ VERSION="${{ github.event.milestone.title }}"
+ echo "::set-env name=RELEASE_VERSION::$VERSION"
+
+ - name: Create release branch
+ run: git checkout -b release/${{ env.RELEASE_VERSION }}
+
+ - 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
+ run: git push origin release/${{ env.RELEASE_VERSION }}
+
+ - name: Create pull request
+ uses: thomaseizinger/create-pull-request@1.0.0
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ head: release/${{ env.RELEASE_VERSION }}
+ base: master
+ title: Release ${{ env.RELEASE_VERSION }}