Skip to content

Commit 3859f69

Browse files
committed
add: workflow dispatch for qa/prod release
1 parent ad45e63 commit 3859f69

File tree

2 files changed

+60
-2
lines changed

2 files changed

+60
-2
lines changed

.github/workflows/deploy_vercel.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# .github/workflows/deploy_vercel.yml
2-
32
name: DeployProd
43
on:
54
push:
@@ -8,7 +7,7 @@ on:
87
workflow_dispatch:
98
inputs:
109
release:
11-
description: 'release type'
10+
description: 'release type (prod release only)'
1211
required: true
1312
default: 'production'
1413
targetbranch:
@@ -20,6 +19,31 @@ env:
2019
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
2120
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
2221
jobs:
22+
release:
23+
name: Release
24+
if: "github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'production'"
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
- uses: actions/checkout@v3
31+
with:
32+
persist-credentials: false
33+
fetch-depth: 0
34+
- name: setup git
35+
run: |
36+
git config --local user.email "[email protected]"
37+
git config --local user.name "Techadmin"
38+
npm install -g auto-changelog
39+
40+
- name: update version prod
41+
run: |
42+
npm version minor -m "chore: release prod version %s [skip build]"
43+
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodProtocolUI staging:${{ github.event.inputs.targetbranch }} --force --follow-tags
44+
git checkout master
45+
git merge staging
46+
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodProtocolUI master --follow-tags
2347
deploy:
2448
runs-on: ubuntu-latest
2549
steps:

.github/workflows/preview_vercel.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,44 @@ on:
88
branches:
99
- master
1010
workflow_dispatch:
11+
inputs:
12+
release:
13+
description: 'release type (qa release only)'
14+
required: true
15+
default: 'qa'
16+
targetbranch:
17+
description: 'target deployment branch'
18+
required: true
19+
default: 'staging'
1120
env:
1221
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
1322
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1423
jobs:
24+
release:
25+
name: Release
26+
if: "github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'qa'"
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/setup-node@v3
30+
with:
31+
node-version: 18
32+
- uses: actions/checkout@v3
33+
with:
34+
persist-credentials: false
35+
fetch-depth: 0
36+
- name: setup git
37+
run: |
38+
git config --local user.email "[email protected]"
39+
git config --local user.name "Techadmin"
40+
npm install -g auto-changelog
41+
42+
- name: update version qa
43+
run: |
44+
npm version minor -m "chore: release qa version %s [skip build]"
45+
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodDAPP master:${{ github.event.inputs.targetbranch }} --force --follow-tags
46+
git checkout master
47+
git merge staging
48+
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodDAPP master --follow-tags
1549
preview:
1650
runs-on: ubuntu-latest
1751
environment:

0 commit comments

Comments
 (0)