-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.28 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
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}')
image_name=$(grep -oE 'release_name\s+=\s+"([^"]+)"' ./release | awk -F'"' '{print $2}')
description=$(grep -oE 'description\s+=\s+"([^"]+)"' ./release | awk -F'"' '{print $2}')
echo "TAG_NAME=$version" >> $GITHUB_ENV
echo "RELEASE_NAME=$image_name" >> $GITHUB_ENV
echo "RELEASE_BODY=$description" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
tag_name: ${{ env.TAG_NAME }}
release_name: ${{ env.RELEASE_NAME }}
body: ${{ env.RELEASE_BODY }}
- name: Create Tag
run: |
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}