-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: exporter and lint actions (#41)
- Loading branch information
Showing
3 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Export Interfaces And Contracts | ||
name: Canary Release | ||
|
||
on: [push] | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
export: | ||
|
@@ -10,21 +10,23 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
export_type: ["interfaces", "contracts"] | ||
export_type: ['interfaces', 'contracts'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
registry-url: "https://registry.npmjs.org" | ||
registry-url: 'https://registry.npmjs.org' | ||
node-version: 18.x | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
|
@@ -39,14 +41,14 @@ jobs: | |
uses: defi-wonderland/[email protected] | ||
with: | ||
# Update package_name with your package name | ||
package_name: "my-cool-project" | ||
out: "out" | ||
interfaces: "solidity/interfaces" | ||
contracts: "solidity/contracts" | ||
export_type: "${{ matrix.export_type }}" | ||
package_name: 'my-cool-project' | ||
out: 'out' | ||
interfaces: 'solidity/interfaces' | ||
contracts: 'solidity/contracts' | ||
export_type: '${{ matrix.export_type }}' | ||
|
||
- name: Publish to NPM - ${{ matrix.export_type }} | ||
# Update `my-cool-project` with your package name | ||
run: cd export/my-cool-project-${{ matrix.export_type }} && npm publish --access public | ||
run: cd export/my-cool-project-${{ matrix.export_type }} && npm publish --access public --tag canary | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Production Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
# Remove the following line if you wish to export your Solidity contracts and interfaces and publish them to NPM | ||
if: false | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
export_type: ['interfaces', 'contracts'] | ||
|
||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
registry-url: 'https://registry.npmjs.org' | ||
node-version: 18.x | ||
cache: 'yarn' | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build project and generate out directory | ||
run: yarn build | ||
|
||
- name: Export Solidity - ${{ matrix.export_type }} | ||
uses: defi-wonderland/[email protected] | ||
with: | ||
# Update package_name with your package name | ||
package_name: 'my-cool-project' | ||
out: 'out' | ||
interfaces: 'solidity/interfaces' | ||
contracts: 'solidity/contracts' | ||
export_type: '${{ matrix.export_type }}' | ||
|
||
- name: Publish to NPM - ${{ matrix.export_type }} | ||
# Update `my-cool-project` with your package name | ||
run: cd export/my-cool-project-${{ matrix.export_type }} && npm publish --access public --tag latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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