-
Notifications
You must be signed in to change notification settings - Fork 37
57 lines (48 loc) · 1.35 KB
/
update-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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 "[email protected]"
git config --global user.name "Build"
git add package.json
git commit -m "update: version"
git push --force-with-lease