|
| 1 | +name: Publish Pyth SDK to crates.io |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: [main] |
| 7 | +jobs: |
| 8 | + publish-pyth-common-js: |
| 9 | + name: Publish Pyth Common JS |
| 10 | + runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + node-version: [14.x, 16.x, 18.x] |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v2 |
| 16 | + - name: Use Node.js ${{ matrix.node-version }} |
| 17 | + uses: actions/setup-node@v2 |
| 18 | + with: |
| 19 | + node-version: ${{ matrix.node-version }} |
| 20 | + - run: npm ci |
| 21 | + working-directory: "pyth-common-js" |
| 22 | + - run: npm run build |
| 23 | + working-directory: "pyth-common-js" |
| 24 | + publish-pyth-evm-js: |
| 25 | + name: Publish Pyth EVM JS |
| 26 | + runs-on: ubuntu-latest |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + node-version: [14.x, 16.x, 18.x] |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v2 |
| 32 | + with: |
| 33 | + persist-credentials: false |
| 34 | + # This step is required for npm 14 to work for installing this |
| 35 | + - name: Reconfigure git to use HTTP authentication |
| 36 | + run: > |
| 37 | + git config --global url."https://github.com/".insteadOf |
| 38 | + |
| 39 | + - name: Use Node.js ${{ matrix.node-version }} |
| 40 | + uses: actions/setup-node@v2 |
| 41 | + with: |
| 42 | + node-version: ${{ matrix.node-version }} |
| 43 | + - run: npm ci |
| 44 | + working-directory: "pyth-evm-js" |
| 45 | + - run: npm run build |
| 46 | + working-directory: "pyth-evm-js" |
| 47 | + publish-pyth-terra-js: |
| 48 | + name: Publish Pyth Common JS |
| 49 | + runs-on: ubuntu-latest |
| 50 | + strategy: |
| 51 | + matrix: |
| 52 | + node-version: [14.x, 16.x, 18.x] |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v2 |
| 55 | + - name: Use Node.js ${{ matrix.node-version }} |
| 56 | + uses: actions/setup-node@v2 |
| 57 | + with: |
| 58 | + node-version: ${{ matrix.node-version }} |
| 59 | + - run: npm ci |
| 60 | + working-directory: "pyth-terra-js" |
| 61 | + - run: npm run build |
| 62 | + env: |
| 63 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 64 | + working-directory: "pyth-terra-js" |
0 commit comments