summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-10-05 00:17:29 +0900
committerMatan Kushner <hello@matchai.me>2019-10-05 00:17:29 +0900
commit5fb959313552fba152ba79d56b207b3b7c697d7f (patch)
treed01315ea88b61d7ee8410201677c9b6dce1c73ea
parent3e7b673e8982b82537c83b4fcdfeda696b990dd1 (diff)
ci: Auto-generate CHANGELOG.md
-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 04b729d85..1878aebc9 100644
--- a/.github/workflows/workflow.yml
+++ b/.github/workflows/workflow.yml
@@ -135,7 +135,33 @@ jobs:
- name: Run tests in Docker
run: docker run --rm -v $(pwd):/src/starship starshipcommand/starship-test
- # Publish all packages to Crates.io
+ 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 user.email "bot@starship.rs"
+ git config user.name "Starship Bot"
+
+ git checkout master
+ git add CHANGELOG.md
+ git commit -m "chore: Update changelog"
+ git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ # Publish starship to Crates.io
cargo_publish:
if: startsWith(github.ref, 'refs/tags/v')
name: Publish Cargo Package