Update Git Tag #473
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 Git Tag | |
on: | |
schedule: | |
- cron: '0 19 * * *' # 4am JST | |
workflow_dispatch: | |
jobs: | |
add_git_tag: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- uses: actions/checkout@v4 | |
# https://github.com/ruby/setup-ruby | |
- uses: ruby/setup-ruby@v1 | |
- name: Check update | |
id: app-version | |
run: | | |
echo "$(ruby scripts/git-check-update.rb)" > TMP_LOG | |
echo "version-name=$(cat TMP_LOG)" >> "$GITHUB_OUTPUT" | |
- name: Update app version | |
if: ${{ steps.app-version.outputs.version-name != '' }} | |
run: | | |
ruby scripts/set-version.rb ${{ steps.app-version.outputs.version-name }} | |
- name: Setup git settings | |
if: ${{ steps.app-version.outputs.version-name != '' }} | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "GitHub Actions" | |
- name: Git push | |
if: ${{ steps.app-version.outputs.version-name != '' }} | |
run: | | |
git add variables.gradle | |
git commit -m "Update Version" | |
git push origin | |
- name: Git tag | |
if: ${{ steps.app-version.outputs.version-name != '' }} | |
run: | | |
git tag ${{ steps.app-version.outputs.version-name }} | |
git push origin ${{ steps.app-version.outputs.version-name }} |