-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
51 lines (45 loc) · 1.86 KB
/
update-latest-build-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
##############################################################################################
#
# This Workflow is responsible for updating the latest build version of the project.
# You can provide your own base branch, tag, or SHA for git operations and the pull request.
# and it will generate the latest build version & update the neccessary files for you.
#
##############################################################################################
name: Update Latest Build Version
on:
workflow_dispatch:
inputs:
base-branch:
description: 'The base branch, tag, or SHA for git operations and the pull request.'
required: true
jobs:
generate-build-version:
uses: MetaMask/metamask-mobile-build-version/.github/workflows/[email protected]
permissions:
id-token: write
bump-version:
runs-on: ubuntu-latest
needs: generate-build-version
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.base-branch }}
token: ${{ secrets.PR_TOKEN }}
- name: Bump script
env:
HEAD_REF: ${{ inputs.base-branch }}
run: |
./scripts/set-build-version.sh ${{ needs.generate-build-version.outputs.build-version }}
git diff
git config user.name metamaskbot
git config user.email [email protected]
git add bitrise.yml
git add package.json
git add ios/MetaMask.xcodeproj/project.pbxproj
git add android/app/build.gradle
git commit -m "Bump version number to ${{ needs.generate-build-version.outputs.build-version }}"
git push origin HEAD:"$HEAD_REF" --force