feat(ci): support mainnet branching strategy (#3832)
This commit is contained in:
parent
9ce8907861
commit
02b6251b1a
10
.github/workflows/publish-dist.yml
vendored
10
.github/workflows/publish-dist.yml
vendored
@ -62,17 +62,19 @@ jobs:
|
|||||||
- name: Define variables
|
- name: Define variables
|
||||||
run: |
|
run: |
|
||||||
envName=''
|
envName=''
|
||||||
|
domain="vega.rocks"
|
||||||
if [[ "${{ github.event_name }}" = "push" ]]; then
|
if [[ "${{ github.event_name }}" = "push" ]]; then
|
||||||
domain="vega.rocks"
|
|
||||||
if [[ "${{ github.ref }}" =~ .*release/.* ]]; then
|
if [[ "${{ github.ref }}" =~ .*release/.* ]]; then
|
||||||
envName="$(echo ${{ github.ref }} | rev | cut -d '/' -f 1 | rev)"
|
envName="$(echo ${{ github.ref }} | rev | cut -d '/' -f 1 | rev)"
|
||||||
if [[ "${{ github.ref }}" =~ .*mainnet.* ]]; then
|
|
||||||
domain="vega.community"
|
|
||||||
fi
|
|
||||||
elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then
|
elif [[ "${{ github.ref }}" =~ .*develop$ ]]; then
|
||||||
envName="stagnet1"
|
envName="stagnet1"
|
||||||
elif [[ "${{ matrix.app}}" = "trading" ]] && [[ ${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }} = "true" ]]; then
|
elif [[ "${{ matrix.app}}" = "trading" ]] && [[ ${{ startsWith(github.ref, 'refs/tags/v') && 'true' || 'false' }} = "true" ]]; then
|
||||||
envName="mainnet"
|
envName="mainnet"
|
||||||
|
elif [[ "${{ github.ref }}" =~ .*main$ ]]; then
|
||||||
|
envName="mainnet"
|
||||||
|
fi
|
||||||
|
if [[ "${envName}" = "mainnet" ]]; then
|
||||||
|
domain="vega.xyz"
|
||||||
fi
|
fi
|
||||||
bucketName="${{ matrix.app }}.${envName}.${domain}"
|
bucketName="${{ matrix.app }}.${envName}.${domain}"
|
||||||
echo BUCKET_NAME=${bucketName} >> $GITHUB_ENV
|
echo BUCKET_NAME=${bucketName} >> $GITHUB_ENV
|
||||||
|
Loading…
Reference in New Issue
Block a user