-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.46 KB
/
release.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
36
37
38
39
40
41
42
43
44
name: Create Release Juneo
on:
push:
branches:
- socorta
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git environment
run: |
git config --local user.email "[email protected]"
git config --local user.name "Staketab"
- name: Set Release Variables
id: env_vars
run: |
version=$(grep -oE 'version\s+=\s+"([^"]+)"' ./release | awk -F'"' '{print $2}')
release_name=$(grep -oE 'release_name\s+=\s+"([^"]+)"' ./release | awk -F'"' '{print $2}')
description=$(awk '/description = """$/,/"""/{if (!/description = """/ && !/"""/) print}' ./release)
echo "$description"
echo "::set-output name=TAG_NAME::$version"
echo "::set-output name=RELEASE_NAME::$release_name"
echo "::set-output name=RELEASE_BODY::$description"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
tag_name: ${{ steps.env_vars.outputs.TAG_NAME }}
release_name: ${{ steps.env_vars.outputs.RELEASE_NAME }}_${{ steps.env_vars.outputs.TAG_NAME }}
body: ${{ steps.env_vars.outputs.RELEASE_BODY }}
- name: Create Tag
run: |
git tag ${{ steps.env_vars.outputs.TAG_NAME }}
git push origin ${{ steps.env_vars.outputs.TAG_NAME }}