Update copyright year(s) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update copyright year(s) | |
on: | |
# Manual trigger | |
workflow_dispatch: | |
# Every January 1st at 3am GMT | |
schedule: | |
- cron: "0 3 1 1 *" | |
jobs: | |
license: | |
# This workflow is only of value to PyBaMM and would always be skipped in forks | |
if: github.repository_owner == 'pybamm-team' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Update year in license | |
uses: FantasticFiasco/action-update-license-year@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: LICENSE.txt | |
docs: | |
# This workflow is only of value to PyBaMM and would always be skipped in forks | |
if: github.repository_owner == 'pybamm-team' | |
needs: license | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Update year in docs | |
uses: FantasticFiasco/action-update-license-year@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: docs/conf.py | |
transform: (?<=copyright = ")(?<from>\d{4})?-?(\d{4})? |