name: Update copyright year(s) in license file

on:
  schedule:
    - cron: "0 0 4 1 *"

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: develop
        fetch-depth: 0
    - uses: FantasticFiasco/action-update-license-year@v2
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        path: |
          README.md
          samples/sampler/README.md
        branchName: license/{{currentYear}}
        commitTitle: update license
        commitBody: Let's keep legal happy.
        prTitle: Update copyright years in README.md file
        prBody: It's that time of the year, let's update the license.
