Skip to content

Release

Release #1

Workflow file for this run

name: Release
on:
push:
branches:
- main
paths-ignore:
- "docs/**"
- "**.md"
- ".vscode/**"
- ".idea/**"
permissions:
contents: read
packages: read
jobs:
ci-dapp:
name: CI Dapp
uses: ./.github/workflows/node-ci.yml
with:
working-directory: ./src/dapp
compile-script: npm run typecheck
audit-script: npm run audit --audit-level=high
ci-xgov-dapp:
name: CI xGov Dapp
uses: ./.github/workflows/node-ci.yml
with:
working-directory: ./src/xgov-dapp
pre-run-script: cd ../dapp && npm ci
compile-script: npm run typecheck
audit-script: npm run audit --audit-level=high
ci-api:
name: CI API
uses: ./.github/workflows/node-ci.yml
with:
working-directory: ./src/voting-metadata-api
compile-script: npm run typecheck
audit-script: npm run audit --audit-level=high
ci-infrastructure:
name: CI Infrastructure
uses: ./.github/workflows/node-ci.yml
with:
working-directory: ./infrastructure
audit-script: npm run audit --audit-level=high
ci-algorand:
name: Algorand build
uses: ./.github/workflows/smart-contract-ci.yml
with:
working-directory: ./src/algorand
build-dapp:
name: Build Dapp
uses: ./.github/workflows/node-build-zip.yml
with:
working-directory: ./src/dapp
build-path: dist
artifact-name: dapp
static-site: true
static-site-env-prefix: VITE
needs:
- ci-dapp
- ci-algorand
build-xgov-dapp:
name: Build xGov Dapp
uses: ./.github/workflows/node-build-zip.yml
with:
working-directory: ./src/xgov-dapp
pre-run-script: cd ../dapp && npm ci
build-path: dist
artifact-name: xgov-dapp
static-site: true
static-site-env-prefix: VITE
needs:
- ci-xgov-dapp
- ci-algorand
build-api:
name: Build API
uses: ./.github/workflows/node-build-zip.yml
with:
working-directory: ./src/voting-metadata-api
artifact-name: api
needs:
- ci-api
build-infrastructure:
name: Build Infrastructure
uses: ./.github/workflows/node-build-zip.yml
with:
working-directory: ./infrastructure
artifact-name: infrastructure
needs:
- ci-infrastructure
deploy-to-dev:
runs-on: ubuntu-latest
name: Deploy to TestNet
environment: Dev
concurrency: "${{ github.workflow }}-dev"
needs:
- build-dapp
- build-xgov-dapp
- build-infrastructure
- build-api
steps:
- name: Deploy
uses: makerxstudio/shared-config/.github/actions/node-deploy-cdk@main
env:
NO_BUILD: true
DEPLOYMENT_ENVIRONMENT: testnet
CDK_DEFAULT_ACCOUNT: ${{ secrets.CDK_DEFAULT_ACCOUNT }}
AWS_DEFAULT_REGION: us-west-2
BASE_DOMAIN: algorand.foundation
WEBSITE_BUILD_PATH: ${{ github.workspace }}/dapp/dist
WEBSITE_BUILD_PATH_XGOV: ${{ github.workspace }}/xgov-dapp/dist
API_BUILD_PATH: ${{ github.workspace }}/api/build
WEB3_STORAGE_API_TOKEN: ${{ secrets.WEB3_STORAGE_API_TOKEN }}
NODE_ENV: production
API_ALLOWED_ADDRESSES: ${{ vars.CREATOR_ALLOW_LIST_ADDRESSES }}
API_BINARY_CONTENT_TYPES: 'image/*'
with:
app-artifact-unzips: |-
dapp:dapp/dist
xgov-dapp:xgov-dapp/dist
api:api/build
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
aws-region: us-west-2
static-site-transforms: |-
VITE_ALGOD_NODE_CONFIG_TOKEN:${{ secrets.ALGOD_NODE_CONFIG_TOKEN }}
VITE_ALGOD_NODE_CONFIG_SERVER:${{ vars.ALGOD_NODE_CONFIG_SERVER }}
VITE_ALGOD_NODE_CONFIG_PORT:${{ vars.ALGOD_NODE_CONFIG_PORT }}
VITE_ALGOD_NETWORK:${{ vars.ALGOD_NETWORK }}
VITE_INDEXER_SERVER:${{ vars.INDEXER_SERVER }}
VITE_INDEXER_PORT:${{ vars.INDEXER_PORT }}
VITE_INDEXER_TOKEN:${{ secrets.INDEXER_TOKEN }}
VITE_ENVIRONMENT:${{ vars.ENVIRONMENT}}
VITE_IPFS_GATEWAY_URL:${{ vars.IPFS_GATEWAY_URL }}
VITE_ALGO_EXPLORER_URL: ${{ vars.ALGO_EXPLORER_URL }}
VITE_NFT_EXPLORER_URL: ${{ vars.NFT_EXPLORER_URL }}
VITE_IS_TESTNET: ${{ vars.IS_TESTNET }}
VITE_XGOV_CREATOR_ALLOW_LIST: ${{ vars.XGOV_CREATOR_ALLOW_LIST_ADDRESSES }}
VITE_CREATOR_ALLOW_LIST: ${{ vars.CREATOR_ALLOW_LIST_ADDRESSES }}
VITE_HIDDEN_VOTING_ROUND_IDS: ${{ vars.HIDDEN_VOTING_ROUND_IDS }}
VITE_XGOV_GOVENERS_URL: ${{ vars.XGOV_GOVENERS_URL }}
VITE_XGOV_TERM_POOLS_URL: ${{ vars.XGOV_TERM_POOLS_URL }}
deploy-to-prod:
runs-on: ubuntu-latest
name: Deploy to Prod
environment: Prod
concurrency: "${{ github.workflow }}-prod"
needs:
- deploy-to-dev
steps:
- name: Deploy
uses: makerxstudio/shared-config/.github/actions/node-deploy-cdk@main
env:
NO_BUILD: true
DEPLOYMENT_ENVIRONMENT: prod
CDK_DEFAULT_ACCOUNT: ${{ secrets.CDK_DEFAULT_ACCOUNT }}
AWS_DEFAULT_REGION: us-west-2
BASE_DOMAIN: algorand.foundation
WEBSITE_BUILD_PATH: ${{ github.workspace }}/dapp/dist
WEBSITE_BUILD_PATH_XGOV: ${{ github.workspace }}/xgov-dapp/dist
API_BUILD_PATH: ${{ github.workspace }}/api/build
WEB3_STORAGE_API_TOKEN: ${{ secrets.WEB3_STORAGE_API_TOKEN }}
NODE_ENV: production
API_ALLOWED_ADDRESSES: ${{ vars.CREATOR_ALLOW_LIST_ADDRESSES }}
API_BINARY_CONTENT_TYPES: 'image/*'
with:
app-artifact-unzips: |-
dapp:dapp/dist
xgov-dapp:xgov-dapp/dist
api:api/build
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
aws-region: us-west-2
static-site-transforms: |-
VITE_ALGOD_NODE_CONFIG_TOKEN:${{ secrets.ALGOD_NODE_CONFIG_TOKEN }}
VITE_ALGOD_NODE_CONFIG_SERVER:${{ vars.ALGOD_NODE_CONFIG_SERVER }}
VITE_ALGOD_NODE_CONFIG_PORT:${{ vars.ALGOD_NODE_CONFIG_PORT }}
VITE_ALGOD_NETWORK:${{ vars.ALGOD_NETWORK }}
VITE_INDEXER_SERVER:${{ vars.INDEXER_SERVER }}
VITE_INDEXER_PORT:${{ vars.INDEXER_PORT }}
VITE_INDEXER_TOKEN:${{ secrets.INDEXER_TOKEN }}
VITE_ENVIRONMENT:${{ vars.ENVIRONMENT}}
VITE_IPFS_GATEWAY_URL:${{ vars.IPFS_GATEWAY_URL }}
VITE_ALGO_EXPLORER_URL: ${{ vars.ALGO_EXPLORER_URL }}
VITE_NFT_EXPLORER_URL: ${{ vars.NFT_EXPLORER_URL }}
VITE_IS_TESTNET: ${{ vars.IS_TESTNET }}
VITE_XGOV_CREATOR_ALLOW_LIST: ${{ vars.XGOV_CREATOR_ALLOW_LIST_ADDRESSES }}
VITE_CREATOR_ALLOW_LIST: ${{ vars.CREATOR_ALLOW_LIST_ADDRESSES }}
VITE_HIDDEN_VOTING_ROUND_IDS: ${{ vars.HIDDEN_VOTING_ROUND_IDS }}
VITE_XGOV_GOVENERS_URL: ${{ vars.XGOV_GOVENERS_URL }}
VITE_XGOV_TERM_POOLS_URL: ${{ vars.XGOV_TERM_POOLS_URL }}