Skip to content

Update License

Update License #3

name: Update License
on:
workflow_dispatch:
schedule:
# Update the license once a year on January 1
- cron: "0 0 1 1 *"
jobs:
update-license:
runs-on: ubuntu-latest
steps:
# Check out the repository
- uses: actions/checkout@v2
# Update the license file
- name: Update License
run: |
year=$(date +%Y)
sed -i "s/Copyright (c) [0-9]\{4\}/Copyright (c) $year/" LICENSE.txt
# Commit and push the changes
- name: Commit and push
uses: stefanzweifel/git-auto-commit-action@v3
with:
commit_message: "chore(others): ✨ Update license to current year"
push: true