-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add gh action: auto build and update changelog
- Loading branch information
1 parent
d51e500
commit 24a46ac
Showing
1 changed file
with
44 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,44 @@ | ||
name: Build and Update Changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Generate Changelog | ||
uses: github-changelog-generator/github-changelog-generator@master | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
output: CHANGELOG.md | ||
base: '' | ||
header-label: '# Changelog' | ||
unreleased: true | ||
compare-link: true | ||
future-release: vNext | ||
|
||
- name: Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add CHANGELOG.md | ||
git commit -m "Update CHANGELOG.md" && git push origin || echo "No changes to commit" | ||