Skip to content

Commit

Permalink
compile
Browse files Browse the repository at this point in the history
  • Loading branch information
0xilbiscione committed Mar 16, 2024
1 parent c0c8f94 commit 0a0427f
Show file tree
Hide file tree
Showing 31 changed files with 83 additions and 13,887 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/thirdweb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: thirdweb

on:
# Triggers the workflow on push or pull request events
push:
branches: ["*"]
pull_request:
branches: ["*"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy_or_publish:
runs-on: ubuntu-latest
outputs:
deploy_output: ${{ steps.deploy.outputs.stdout }}
publish_output: ${{ steps.publish.outputs.stdout }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: deploy
id: deploy
if: github.event_name == 'pull_request' || github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
run: |
DEPLOY=$(npx thirdweb deploy --ci | grep http)
echo "::set-output name=stdout::$DEPLOY"
echo "deploy_url: $DEPLOY"
- name: publish
if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
id: publish
run: |
PUBLISH=$(npx thirdweb publish --ci | grep http)
echo "::set-output name=stdout::$PUBLISH"
echo "publish_url: $PUBLISH"
comment_on_commit:
runs-on: ubuntu-latest
needs: [deploy_or_publish]
if: github.event_name == 'push'
steps:
- name: Comment on commit (publish)
uses: peter-evans/commit-comment@v2
if: ${{ needs.deploy_or_publish.outputs.publish_output != '' }}
with:
body: |
Contract compiled, publish using the button below
<p>
<a href="${{ needs.deploy_or_publish.outputs.publish_output }}"><img width="120px" src="https://gateway.thirdweb.dev/ipfs/QmS6gcgu3QynRQ4xBEJVL8xNycMyPNW4Da9RgzTswmxQzf/0.svg" /></a>
token: ${{ secrets.GITHUB_TOKEN }}

- name: Comment on commit (deploy)
uses: peter-evans/commit-comment@v2
if: ${{ needs.deploy_or_publish.outputs.deploy_output != '' }}
with:
body: |
Contract compiled, deploy using the button below
<p>
<a href="${{ needs.deploy_or_publish.outputs.deploy_output }}"><img width="120px" src="https://gateway.thirdweb.dev/ipfs/QmdS2yxCteNePeAw9h7dnaSvorNA1AMYCtX4DuG15YR3jo/0.svg" /></a>
token: ${{ secrets.GITHUB_TOKEN }}


comment_on_pr:
runs-on: ubuntu-latest
needs: [deploy_or_publish]
if: github.event_name == 'pull_request'
steps:
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v1
with:
message: |
Contract compiled, deploy using the button below
<p>
<a href="${{ needs.deploy_or_publish.outputs.deploy_output }}"><img width="120px" src="https://gateway.thirdweb.dev/ipfs/QmdS2yxCteNePeAw9h7dnaSvorNA1AMYCtX4DuG15YR3jo/0.svg" /></a>
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 0 additions & 34 deletions mb-guild/.github/workflows/test.yml

This file was deleted.

4 changes: 0 additions & 4 deletions mb-guild/.gitignore

This file was deleted.

Empty file removed mb-guild/.gitmodules
Empty file.
47 changes: 0 additions & 47 deletions mb-guild/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions mb-guild/foundry.toml

This file was deleted.

16 changes: 0 additions & 16 deletions mb-guild/package.json

This file was deleted.

66 changes: 0 additions & 66 deletions mb-guild/src/StakingReward.sol

This file was deleted.

12 changes: 0 additions & 12 deletions mb-guild/test/Contract.t.sol

This file was deleted.

34 changes: 0 additions & 34 deletions mbg-staking/.github/workflows/test.yml

This file was deleted.

4 changes: 0 additions & 4 deletions mbg-staking/.gitignore

This file was deleted.

Empty file removed mbg-staking/.gitmodules
Empty file.
47 changes: 0 additions & 47 deletions mbg-staking/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions mbg-staking/foundry.toml

This file was deleted.

1 change: 0 additions & 1 deletion mbg-staking/lib/forge-std
Submodule forge-std deleted from b6a506
Loading

0 comments on commit 0a0427f

Please sign in to comment.