Skip to content

Update copyright year(s) #1

Update copyright year(s)

Update copyright year(s) #1

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})?