Skip to content

lowercase

lowercase #27

Workflow file for this run

name: Auto Release
on:
push:
branches:
- main
jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Get commit message
id: get_commit_message
run: echo "::set-output name=message::$(git log -1 --pretty=%B)"
- name: Extract version and description from commit message
id: extract_details
run: |
message="${{ steps.get_commit_message.outputs.message }}"
if [[ "$message" =~ Release[[:space:]]-[[:space:]]([0-9]+\.[0-9]+\.[0-9]+) ]]; then
version="${BASH_REMATCH[1]}"
description="${message/Release - $version/}"
echo "::set-output name=version::$version"
echo "::set-output name=description::$description"
fi
- name: Create GitHub Release
id: create_release
if: steps.extract_details.outputs.version != ''
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_details.outputs.version }}
release_name: Noir ${{ steps.extract_details.outputs.version }}
body: |
# 📚 Details
**Version:** `${{ steps.extract_details.outputs.version }}`
# ❔ Installation
Check out the [documentation](https://cuhhub.gitbook.io/noir) for information on how to install and use Noir in your addon.
# 📝 Description
${{ steps.extract_details.outputs.description }}
draft: false
prerelease: false
- name: Upload release asset
id: upload_release_asset
if: steps.extract_details.outputs.version != ''
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./_build/Noir.lua
asset_name: Noir.lua
asset_content_type: application/octet-stream