Create Release #3
Workflow file for this run
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
name: Create Release | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Git User Identity | |
env: | |
GH_EMAIL: ${{ secrets.GH_EMAIL }} | |
GH_USER: ${{ secrets.GH_USER }} | |
run: | | |
git config --global user.email "$GH_EMAIL" | |
git config --global user.name "$GH_USER" | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Get Version from VERSION File | |
id: get_version | |
run: | | |
VERSION=$(cat VERSION) | |
echo "::set-output name=version::$VERSION" | |
- name: Create Git Tag | |
run: | | |
TAG_NAME="${{ steps.get_version.outputs.version }}" | |
git tag -a $TAG_NAME -m "Release $TAG_NAME" | |
git push origin $TAG_NAME | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ steps.get_version.outputs.version }} | |
release_name: Release ${{ steps.get_version.outputs.version }} | |
body: | | |
Release $TAG_NAME | |
draft: false | |
prerelease: false |