-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80e2447
commit 794c3ba
Showing
1 changed file
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |