ci(suite-native): auto monthly version bump #1
Workflow file for this run
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: "[Bot] suite-native monthly version bump" | |
on: | |
schedule: | |
# Runs on the first day of every month at 00:00 UTC | |
# - cron: "0 0 1 * *" | |
- cron: "0 0 * * *" | |
# Allow manual trigger for testing | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Update Version | |
run: | | |
# Get current year and month | |
YEAR=$(date +%y) | |
MONTH=$(date +%y) | |
# MONTH=$(date +%-m) | |
# Update version in package.json | |
jq --arg version "$YEAR.$MONTH.1" '.version = $version' suite-native/app/package.json > temp.json && mv temp.json suite-native/app/package.json | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
title: "chore(suite-native): bump version to ${{ env.YEAR }}.${{ env.MONTH }}.1" | |
body: | | |
Automated version bump to follow YY.MM.MINOR convention | |
- Updates version in package.json to ${{ env.YEAR }}.${{ env.MONTH }}.1 | |
branch: "chore/native/bump-version-to-${{ env.YEAR }}.${{ env.MONTH }}.1" | |
base: "develop" # Change this to your default branch if different | |
delete-branch: true | |
labels: mobile ci |