Skip to content

Commit

Permalink
chore: update canary release action
Browse files Browse the repository at this point in the history
  • Loading branch information
0xShaito committed Aug 8, 2024
1 parent 031fb2b commit 4a846a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/interfaces-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ jobs:
export:
name: Generate Interfaces And Contracts

# 1) 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', 'all']

env:
# 2) Fill the project name to be used in NPM
PROJECT_NAME: '@defi-wonderland/prophet-core'
EXPORT_NAME: ${{ matrix.export_type == 'interfaces' && '-interfaces' || '' }}

Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/interfaces-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on: workflow_dispatch
jobs:
export:
name: Generate Interfaces And Contracts

runs-on: ubuntu-latest
strategy:
matrix:
export_type: ['interfaces', 'all']

env:
PROJECT_NAME: '@defi-wonderland/prophet-core'
EXPORT_NAME: ${{ matrix.export_type == 'interfaces' && '-interfaces' || '' }}

steps:
Expand Down Expand Up @@ -38,17 +40,17 @@ jobs:
- name: Update version
run: yarn version --new-version "0.0.0-${GITHUB_SHA::8}" --no-git-tag-version

- name: Export Solidity - Export Type: ${{ matrix.export_type }}
- name: Export Solidity - Export Type ${{ matrix.export_type }}
uses: defi-wonderland/[email protected]
with:
package_name: "@defi-wonderland/prophet-core"
package_name: ${{ env.PROJECT_NAME }}
out: 'out'
interfaces: 'solidity/interfaces'
contracts: 'solidity/contracts'
libraries: "solidity/libraries"
export_type: '${{ matrix.export_type }}'

- name: Publish to NPM - Export Type: ${{ matrix.export_type }}
run: cd export/@defi-wonderland/prophet-core${{ env.EXPORT_NAME }} && npm publish --access public
- name: Publish to NPM - Export Type ${{ matrix.export_type }}
run: cd export/${{ env.PROJECT_NAME }}${{ env.EXPORT_NAME }} && npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 4a846a2

Please sign in to comment.