This GitHub Action automatically updates the year in the `LICENSE` file of the repository.
- Updates the year in the
LICENSE
file to the current year. - Commits and pushes the change automatically.
- Skips execution if no
LICENSE
file is found. - Runs automatically on January 1st every year or manually when triggered.
- Go to the GitHub Actions Marketplace.
- Click "Use latest version" to add it to your repository.
- Follow the prompts to configure and enable the action.
-
Add the following file
.github/workflows/update-license-year.yaml
in your repository: -
name: Update License Year on: schedule: - cron: '0 0 1 1 *' # Runs every January 1st workflow_dispatch: # Allows manual trigger jobs: update-license-year: runs-on: ubuntu-latest steps: - name: Update License Year Action uses: EduardaSRBastos/update-license-year-action/update-license-year@main with: github_token: ${{ secrets.GITHUB_TOKEN }}
To manually trigger the workflow:
- Go to GitHub → Your Repository → Actions.
- Select "Update License Year" workflow.
- Click "Run Workflow".
- Support this project by giving it a star ⭐. Thanks!
- Feel free to suggest improvements or report any issues in the repository.
This project is licensed under the MIT License - see the LICENSE file for details.