-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Git Merge Diff | ||
|
||
This action generate git merge diff between tags. | ||
|
||
# Usage | ||
|
||
```yaml | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- name: Diff | ||
id: diff | ||
uses: yanamura/git-merge-diff@v1 | ||
``` | ||
> Note: don't forget to fetch.(actions/checkout only fetch depth=0) | ||
## get output(merge diff) | ||
``` | ||
steps.<step id>.outputs.diff | ||
``` | ||
|
||
# Senario | ||
|
||
```yaml | ||
- uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
- name: Diff | ||
id: diff | ||
uses: yanamura/git-merge-diff@v1 | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
${{ steps.diff.outputs.diff }} | ||
draft: false | ||
prerelease: false | ||
``` |