bump-date.yml 849 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # bump-date.yml
  3. # Bump the distribution date once per day
  4. #
  5. name: Bump Distribution Date
  6. on:
  7. schedule:
  8. - cron: '0 0 * * *'
  9. jobs:
  10. bump_date:
  11. name: Bump Distribution Date
  12. if: github.repository == 'MarlinFirmware/Marlin'
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Check out bugfix-2.0.x
  16. uses: actions/checkout@v2
  17. with:
  18. ref: bugfix-2.0.x
  19. - name: Bump Distribution Date
  20. run: |
  21. # Inline Bump Script
  22. DIST=$( date +"%Y-%m-%d" )
  23. eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
  24. git config user.name "${GITHUB_ACTOR}" && \
  25. git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
  26. git add . && \
  27. git commit -m "[cron] Bump distribution date ($DIST)" && \
  28. git push