Auto-tagger #42
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
# Automatically create a new version/tag, if new commits are available since the last tag | |
name: Auto-tagger | |
on: | |
schedule: | |
- cron: '31 13 * * 3' # Every Wednesday at 13:31 https://crontab.guru/#31_13_*_*_3 | |
jobs: | |
create-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: fregante/setup-git-token@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
if [[ $(git tag -l --points-at HEAD) = "" ]]; then | |
export VER=$(npx daily-version) | |
git tag $VER -m $VER | |
git push origin $VER | |
fi |