forked from pybamm-team/PyBaMM
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.08 KB
/
update_license.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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})?