Skip to content

Commit 4cd3955

Browse files
committed
Update LICENSE.txt
Add workflow to update year in LICENSE.txt
1 parent 67c9834 commit 4cd3955

File tree

4 files changed

+38
-24
lines changed

4 files changed

+38
-24
lines changed

.github/workflows/update-license.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Update License Year
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 1 1 *" # Runs on January 1st every year
6+
workflow_dispatch: # Allows manual triggering
7+
8+
jobs:
9+
update-license:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
18+
- name: Update LICENSE year
19+
run: |
20+
CURRENT_YEAR=$(date +"%Y")
21+
sed -E -i "s/(Copyright © )[0-9]{4}/\1$CURRENT_YEAR/" LICENSE.txt
22+
23+
- name: Commit and push changes
24+
run: |
25+
CURRENT_YEAR=$(date +"%Y")
26+
git config --global user.name "Borewit"
27+
git config --global user.email "[email protected]"
28+
git diff --quiet LICENSE.txt || (git add LICENSE.txt && git commit -m "Update license year to $CURRENT_YEAR" && git push)

LICENSE

-15
This file was deleted.

LICENSE.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2025 Borewit
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,4 @@ graph TD;
373373

374374
## Licence
375375

376-
(The MIT License)
377-
378-
Copyright (c) 2024 Borewit
379-
380-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
381-
382-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
383-
384-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
376+
This project is licensed under the [MIT License](LICENSE.txt). Feel free to use, modify, and distribute as needed.

0 commit comments

Comments
 (0)