Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/oraichain/oraiswap-v3 in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
tubackkhoa committed Jul 15, 2024
2 parents f327041 + 748a57c commit 1d6b64b
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/publish_oraiswap_v3_wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: publish_package_oraiswap_v3_wasm

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [develop]

# 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:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: ["18"]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
# - uses: actions/cache@v4
# id: yarn-cache
# with:
# path: |
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
# ./node_modules/
# key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn global add wasm-pack
- name: Build
run: cd wasm && wasm-pack build --target nodejs --scope oraichain --features tsify/js

- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish Oraiswap V3 Wasm
id: publish-oraiswap-v3-wasm
continue-on-error: true
run: cd wasm/pkg && npm publish --access public
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: send result via discord
# uses: appleboy/discord-action@master
# with:
# webhook_id: ${{ secrets.WEBHOOK_ID }}
# webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
# username: "GitBot"
# message: "Repo oraidexswap_v3_wasm has just published. Oraiswap v3 wasm: ${{ steps.publish-oraiswap-v3-wasm.outcome }}. ${{ github.event.head_commit.author.name }}"

0 comments on commit 1d6b64b

Please sign in to comment.