Boom Staking & Airdrop Automation #5
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
name: Boom Staking & Airdrop Automation | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "0 12 * * *" # Runs every day at 12:00 UTC | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install ethers dotenv hardhat | |
- name: Compile smart contract | |
run: npx hardhat compile | |
- name: Deploy contract | |
run: | | |
npx hardhat run scripts/deploy.js --network base | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
RPC_URL: ${{ secrets.RPC_URL }} | |
airdrop: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: npm install ethers dotenv | |
- name: Execute Airdrop | |
run: node scripts/airdrop-rewards.js | |
env: | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
RPC_URL: ${{ secrets.RPC_URL }} |