Update License #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |