Skip to content

Commit

Permalink
Create new release on PR merge
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Feb 15, 2020
1 parent 80e2447 commit 794c3ba
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
name: "Release new version"

on:
push:
pull_request:
branches:
- master
types:
- closed

jobs:
release:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- uses: actions/checkout@v2
- name: Extract version from branch (what about hot fixes?)
run: |
echo "Hello world"
- name: Make new release on GitHub
- name: Extract version from branch name
run: |
echo "Hello world"
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "::set-env name=RELEASE_VERSION::$VERSION"
- uses: actions/checkout@v2
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}

0 comments on commit 794c3ba

Please sign in to comment.