Skip to content

Commit

Permalink
Use yearplusplus to change LICENSE year
Browse files Browse the repository at this point in the history
  • Loading branch information
endormi authored Apr 12, 2024
1 parent 2daac15 commit 81cc3df
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/year.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update Year

on:
schedule:
- cron: "0 1 1 1 *" # 01:00 on January 1

jobs:
update_year:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Update year in LICENSE
uses: endormi/yearplusplus@v1
with:
files: 'LICENSE'

- name: Setup Git configuration
run: |
git config user.name "Year++"
git config user.email "<>"
- name: Commit changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git commit -am "Update copyright year"
git push origin ${{ github.head_ref }}
else
echo "No changes to commit."
fi

0 comments on commit 81cc3df

Please sign in to comment.