Skip to content

Commit

Permalink
Merge pull request #3 from bdougie/add-usage-instructions
Browse files Browse the repository at this point in the history
Add usage instructions
  • Loading branch information
bdougie committed Sep 11, 2019
2 parents ee5004b + e6fc1e2 commit 24a58ac
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
template: |
## What’s Changed
$CHANGES
16 changes: 16 additions & 0 deletions .github/workflows/release-management.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Management

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

jobs:
update_draft_release:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: toolmantim/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
# Variables in Markdown
This GitHub Action will allow you to set variables in Markdown and allow you to interpolate throughout your file.

## Usage

This GitHub Action that replaces template in your variables

```yml
on: issues
name: Template Variables in Markdown
jobs:
markdown:
name: markdown-marker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: bdougie/variables-in-markdown@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

```

This s best used with issue templates. Create an examples `.github/ISSUE_TEMPLATE.md` file. This file should have front matter to help construct the new issue:

```markdown
---
title: New Issue
labels: bug, enhancement
---
<!--#
NOUN=mother
ATTRIBUTION=Mark Wahlberg
$-->

"Say hi to your {{ NOUN }} for me," {{ ATTRIBUTION }}
```

You'll notice that the above example has some `{{ MUSTACHE }}` variables. This is need for the API to find and replace variables. This is powered by the [marky_markdown](https://rubygems.org/gems/marky_markdown) ruby gem.

0 comments on commit 24a58ac

Please sign in to comment.