This commit is contained in:
SaraJane
2025-12-30 13:07:28 +00:00
commit 93e3f09667
95 changed files with 20233 additions and 0 deletions

38
.github/workflows/release.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Release
on:
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '**.md'
- '.vscode/**'
- '.idea/**'
permissions:
contents: read
packages: read
jobs:
TokenizeRWATemplate-contracts-validate:
name: Run TokenizeRWATemplate-contracts release
secrets: inherit
uses: ./.github/workflows/TokenizeRWATemplate-contracts-ci.yaml
TokenizeRWATemplate-contracts-release:
name: Run TokenizeRWATemplate-contracts release
secrets: inherit
uses: ./.github/workflows/TokenizeRWATemplate-contracts-cd.yaml
needs: TokenizeRWATemplate-contracts-validate
TokenizeRWATemplate-frontend-validate:
name: Run TokenizeRWATemplate-frontend release
secrets: inherit
uses: ./.github/workflows/TokenizeRWATemplate-frontend-ci.yaml
TokenizeRWATemplate-frontend-release:
name: Run TokenizeRWATemplate-frontend release
secrets: inherit
uses: ./.github/workflows/TokenizeRWATemplate-frontend-cd.yaml
needs: TokenizeRWATemplate-frontend-validate

View File

@ -0,0 +1,45 @@
name: Release TokenizeRWATemplate-contracts
on:
workflow_call:
jobs:
deploy-testnet:
runs-on: "ubuntu-latest"
environment: contract-testnet
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install algokit
run: pipx install algokit
- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'TokenizeRWATemplate-contracts'
- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"
- name: Deploy to testnet
run: algokit project deploy testnet --project-name 'TokenizeRWATemplate-contracts'
env:
# This is the account that becomes the creator of the contract
DEPLOYER_MNEMONIC: ${{ secrets.DEPLOYER_MNEMONIC }}
# The dispenser account is used to ensure the deployer account is funded
DISPENSER_MNEMONIC: ${{ secrets.DISPENSER_MNEMONIC }}

View File

@ -0,0 +1,72 @@
name: Validate TokenizeRWATemplate-contracts
on:
workflow_call:
jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: '22.x'
cache: 'npm'
cache-dependency-path: "**/package-lock.json"
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install algokit
run: pipx install algokit
- name: Start LocalNet
run: algokit localnet start
- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'TokenizeRWATemplate-contracts'
- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"
- name: Audit dependencies
run: algokit project run audit --project-name 'TokenizeRWATemplate-contracts'
- name: Lint and format
run: algokit project run lint --project-name 'TokenizeRWATemplate-contracts'
- name: Run tests
shell: bash
run: |
set -o pipefail
algokit project run test --project-name 'TokenizeRWATemplate-contracts'
- name: Build smart contracts
run: algokit project run build --project-name 'TokenizeRWATemplate-contracts'
- name: Scan TEAL files for issues
run: algokit project run audit-teal --project-name 'TokenizeRWATemplate-contracts'
# # Uncomment to enable TEAL static analysis with snapshoting using Tealer package
# # Would first require running locally using audit-teal command and committing the snapshots into source control
# # Please note, tealer has a known bug that may result in large snapshot file sizes, track resolution here:
# # https://github.com/crytic/tealer/issues/101
# - name: Check output stability of the smart contracts
# run: algokit project run ci-teal-diff --project-name 'TokenizeRWATemplate-contracts'
- name: Run deployer against LocalNet
run: algokit project deploy localnet --project-name 'TokenizeRWATemplate-contracts'

View File

@ -0,0 +1,37 @@
name: Release TokenizeRWATemplate-frontend
on:
workflow_call:
permissions:
contents: read
packages: read
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to Vercel
environment: frontend-prod
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install algokit
run: pipx install algokit
- name: Bootstrap dependencies
run: algokit project bootstrap all --project-name 'TokenizeRWATemplate-frontend'
- name: Publish to Vercel
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
run: algokit project run ci-deploy-vercel

View File

@ -0,0 +1,47 @@
name: Validate TokenizeRWATemplate-frontend
on:
workflow_call:
jobs:
validate:
runs-on: 'ubuntu-latest'
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "poetry"
- name: Install algokit
run: pipx install algokit
- name: Install dependencies
run: algokit project bootstrap all --project-name 'TokenizeRWATemplate-frontend'
- name: Run linters
run: algokit project run lint --project-name 'TokenizeRWATemplate-frontend'
- name: Run unit tests
run: algokit project run test --project-name 'TokenizeRWATemplate-frontend'
- name: Build
run: algokit project run build --project-name 'TokenizeRWATemplate-frontend'

14
.github/workflows/validate.yaml vendored Normal file
View File

@ -0,0 +1,14 @@
name: Pull Request validation
on: [pull_request]
jobs:
TokenizeRWATemplate-contracts-ci:
name: Run TokenizeRWATemplate-contracts validation
uses: ./.github/workflows/TokenizeRWATemplate-contracts-ci.yaml
TokenizeRWATemplate-frontend-ci:
name: Run TokenizeRWATemplate-frontend validation
uses: ./.github/workflows/TokenizeRWATemplate-frontend-ci.yaml