chore: release prod version 1.79.0 [skip build] #65
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
# .github/workflows/deploy_vercel.yml | |
name: DeployProd | |
on: | |
push: | |
branches: | |
- production | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'release type (prod release only)' | |
required: true | |
default: 'production' | |
targetbranch: | |
description: 'target deployment branch' | |
required: true | |
default: 'production' | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
jobs: | |
release: | |
name: Release | |
if: "github.event_name == 'workflow_dispatch' && github.event.inputs.release == 'production'" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
ref: ${{ github.event.inputs.release == 'qa' && 'master' || 'staging' }} | |
- name: setup git | |
run: | | |
git config --local user.email "techadmin@gooddollar.org" | |
git config --local user.name "Techadmin" | |
npm install -g auto-changelog | |
- name: update version prod | |
run: | | |
npm version minor -m "chore: release prod version %s [skip build]" | |
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodProtocolUI staging:${{ github.event.inputs.targetbranch }} --force --follow-tags | |
git checkout master | |
git merge staging | |
git push https://${{ secrets.GIT_AUTH }}@github.com/GoodDollar/GoodProtocolUI master --follow-tags | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: yarn | |
- run: yarn install --immutable | |
- run: yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- run: yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- run: yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }} |