-
-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (38 loc) · 1.63 KB
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build changelog
on:
repository_dispatch:
types: [ trigger-changelog-workflow ]
workflow_dispatch:
inputs:
next_version:
description: "Next version tag"
required: false
commit_message:
description: "Commit message"
required: false
jobs:
package:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- uses: maicol07/github-changelog-action@master
with:
next_version: ${{ github.event.inputs.next_version }}
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- run: "git commit -m \"changelog: 🔖 Updated changelog for commit ${{ github.sha }}\" -a"
if: ${{ !github.event.inputs.commit_message && !github.event.inputs.next_version }}
- run: "git commit -m \"release: 🔖 ${{ github.event.inputs.next_version }}\" -a"
if: ${{ !github.event.inputs.commit_message && github.event.inputs.next_version }}
- run: "git commit -m \"${{ github.event.inputs.commit_message }}\" -a"
if: ${{ github.event.inputs.commit_message }}
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}