fix: torus unit test #424
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
# This is a basic workflow to help you get started with Actions | |
name: GoodServer Release | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
release: | |
description: 'release type' | |
required: true | |
default: 'qa' | |
targetbranch: | |
description: 'target deployment branch' | |
required: false | |
default: 'staging' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
release: | |
name: Release | |
if: "github.event_name == 'workflow_dispatch'" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 "[email protected]" | |
git config --local user.name "Techadmin" | |
npm install -g auto-changelog | |
- name: update version qa | |
if: "github.event.inputs.release == 'qa'" | |
run: | | |
npm version prerelease -m "chore: release qa version %s [skip build]" | |
git push https://x-access-token:${{ secrets.PAT }}@github.com/GoodDollar/GoodServer master:${{ github.event.inputs.targetbranch }} --force --follow-tags | |
git push https://x-access-token:${{ secrets.PAT }}@github.com/GoodDollar/GoodServer master --follow-tags | |
- name: update version prod | |
if: "github.event.inputs.release != 'qa'" | |
run: | | |
npm version minor -m "chore: release prod version %s [skip build]" | |
git push https://x-access-token:${{ secrets.PAT }}@github.com/GoodDollar/GoodServer staging:${{ github.event.inputs.targetbranch }} --force --follow-tags | |
git checkout master | |
git merge staging | |
git push https://x-access-token:${{ secrets.PAT }}@github.com/GoodDollar/GoodServer master --follow-tags |