Skip to content

Commit

Permalink
Merge pull request #19 from init4tech/swanny/cd
Browse files Browse the repository at this point in the history
feat(cd): adding cd for smart contracts
  • Loading branch information
anna-carroll authored May 8, 2024
2 parents e9abe3f + 4efb727 commit ff2412f
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release and Deploy Contract

on:
push:
branches:
- main
workflow_dispatch:
inputs:
generate-tag:
description: 'Generate a new tag'
required: true
default: 'true'
custom-tag:
description: 'Custom tag to be used if generate-tag is false'
required: false
default: ''
network:
description: 'Network to deploy contract to'
required: true
default: 'holesky'
type: choice
options:
- holesky
environment:
description: 'Environment to deploy contract to'
required: true
default: 'dev'
type: choice
options:
- dev

permissions:
packages: write
contents: write

jobs:
auto-release:
uses: init4tech/actions/.github/workflows/auto-release.yml@main
with:
generate-tag: true
custom-tag: ${{ github.event.inputs.custom-tag }}
deploy-contract:
uses: init4tech/actions/.github/workflows/solidity-deployment.yml@main
needs: auto-release
with:
network: ${{ github.event.inputs.network }}
environment: ${{ github.event.inputs.environment }}
forge-deployment-script: "DeployZenith"
secrets:
aws-deployer-role: ${{ secrets.AWS_DEPLOYER_ROLE }}
holesky-kms-key-id: ${{ secrets.HOLESKY_DEPLOYER_KEY_ID }}
holesky-rpc-url: ${{ secrets.HOLESKY_RPC_URL }}
etherscan-api-key: ${{ secrets.ETHERSCAN_API_KEY }}

0 comments on commit ff2412f

Please sign in to comment.