summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-10-25 21:34:02 +0900
committerMatan Kushner <hello@matchai.me>2019-10-25 21:34:02 +0900
commit043c3c9117a2e3503471da329e48016b1059a924 (patch)
tree2ef49cef7566707750df641143a15d5852a7ce9a /.github
parent1d96338ac61240ea4dd2a103fa8869e65b1ac6e3 (diff)
ci: Add CHANGELOG.md generation
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/workflow.yml28
1 files changed, 27 insertions, 1 deletions
diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml
index 11051bf77..41ddeb454 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -178,7 +178,7 @@ jobs:
- run: |
git config --global user.email "bot@starship.rs"
git config --global user.name "Starship Bot"
- - run: |
+
cd $(brew --repo homebrew/core)
git fetch origin
sudo git reset --hard origin/master
@@ -187,6 +187,32 @@ jobs:
env:
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
+ generate_changelog:
+ if: github.ref == 'refs/heads/master'
+ name: Update Changelog
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@master
+ - name: Delete old changelog
+ run: rm -rf CHANGELOG.md
+ - name: Generate changelog
+ run: |
+ # Temporary fix for https://github.com/actions/setup-go/issues/14
+ export PATH=$PATH:$(go env GOPATH)/bin
+ go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
+ git-chglog -c .github/chglog/changelog.yml > CHANGELOG.md
+ - name: Commit new changelog
+ run: |
+ git config --global user.email "bot@starship.rs"
+ git config --global user.name "Starship Bot"
+
+ git checkout master
+ git add CHANGELOG.md
+ git commit -m "Update changelog"
+ git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
# Create GitHub release with Rust build targets and release notes
github_release:
if: startsWith(github.ref, 'refs/tags/v')