Skip to content

Commit

Permalink
Adds git auto commit and push action plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
GPrimola committed Feb 15, 2024
1 parent 3755bfa commit 3358006
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ jobs:
update_version:
runs-on: ubuntu-20.04
needs: check_package
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -95,17 +99,11 @@ jobs:
otp-version: '22.3.4.26'
version-type: 'strict'
- name: Update README.md and mix.exs
run: |
elixir ./scripts/update_version.exs
git config user.name Lucasbot
git config user.email [email protected]
if [[ -n $(git diff --stat) ]]
then
git commit -am "Updated README.md and mix.exs to version $(cat version)."
git push origin master
else
echo "No version change"
fi
run: elixir ./scripts/update_version.exs
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Updated README.md and mix.exs to version $(cat version).



publish_package:
Expand Down

0 comments on commit 3358006

Please sign in to comment.