-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 1.29 KB
/
releases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Create Release
on: [push, create]
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version values
id: branch_name
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Create Release
id: 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
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }}
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
GIT_COMMIT: ${{ github.sha }}
with:
tag_name: ${{ env.SOURCE_BRANCH }}-${{ env.GIT_COMMIT }}
release_name: ${{ env.SOURCE_BRANCH }}-${{ env.GIT_COMMIT }}
body: |
Changes in this Release
- Added automatic release creation by push to a branch
draft: false
prerelease: false