Skip to content

Merge pull request #5 from Staketab/pre-build #4

Merge pull request #5 from Staketab/pre-build

Merge pull request #5 from Staketab/pre-build #4

Workflow file for this run

name: Create Release
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=$tag_name" >> $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: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/suid
asset_name: suid
asset_content_type: application/octet-stream
- name: Create Tag
run: |
git tag ${{ env.TAG_NAME }}
git push origin ${{ env.TAG_NAME }}