Skip to content

Update Git Tag

Update Git Tag #476

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: Set up git settings
if: ${{ steps.app-version.outputs.version-name != '' }}
uses: ./.github/actions/setup-git-with-github-actions-bot
- 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 }}