Skip to content

Update App Version [MANUAL] #29

Update App Version [MANUAL]

Update App Version [MANUAL] #29

# Overview
# This GitHub Action automates version updating for the Haqq Wallet project on GitHub.
# It can be only manually activated.
# Example:
# We have a 1.2.3 version.
# patch option: 1.2.3 => 1.2.4
# minor option: 1.2.3 => 1.3.0
# major option: 1.2.3 => 2.0.0
name: Update App Version [MANUAL]
on:
workflow_dispatch:
inputs:
version_type:
type: choice
description: Version type to update
default: patch
options:
- major
- minor
- patch
jobs:
update_version:
runs-on: self-hosted
steps:
- name: Show self-hosted machine infomation
run: uname -a
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.SERVICE_TOKEN }}
fetch-depth: 0
- name: Setup NodeJS@18
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install packages
run: yarn install
- name: Execute yarn env:update
run: |
yarn env:update ${{github.event.inputs.version_type}}
- name: Create and push a commit
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "Build"
git add package.json
git commit -m "update: version"
git push --force-with-lease