diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..4d1dda35 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,44 @@ +name: Release to ghcr.io + +on: + push: + branches: + - aptos + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + packages: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Rust Toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + target: wasm32-wasi + components: rust-src + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: https://npm.pkg.github.com + scope: "@${{ github.repository_owner }}" + + - name: Setup registry + run: echo @${{ github.repository_owner }}:registry=https://npm.pkg.github.com >> .npmrc + + - name: Install dependencies + run: yarn install + + - name: Build package + run: yarn build + + - name: Publish package + run: yarn release + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 675801fc..ee1da3aa 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Javascript version of the move language compiler and disassemble * Compiling move package into blob example ```ts import { WasmFs } from '@wasmer/wasmfs' -import { Git, MovePackage } from '@aptos/move-js' +import { Git, MovePackage } from '@aptos-labs/move-js' const startWasiTask = async (app: HTMLDivElement) => { const wasmfs = new WasmFs() @@ -56,7 +56,7 @@ startWasiTask(app) * Disassemble contract example ```ts import { WasmFs } from '@wasmer/wasmfs' -import { Disassemble } from '@aptos/move-js' +import { Disassemble } from '@aptos-labs/move-js' const startDisassembleTask = async (app: HTMLDivElement) => { const wasmfs = new WasmFs() @@ -81,7 +81,7 @@ startDisassembleTask(app) ## Supported Rust Versions -`@aptos/move-js` supports the version of Rust (toolchain and targets) specified +`@aptos-labs/move-js` supports the version of Rust (toolchain and targets) specified in [`rust-toolchain.toml`](rust-toolchain.toml). At the time of writing, we are using version 1.77.0. However, this can change at any time if one of our dependencies changes MSRV or through a new patch version. @@ -94,7 +94,7 @@ Note: You will need rust installed also for this. https://www.rust-lang.org/tool curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -Then get `@aptos/move-js` source: +Then get `@aptos-labs/move-js` source: ``` git clone https://github.com/movefuns/move-js diff --git a/examples/disassemble/package.json b/examples/disassemble/package.json index 63c57478..9c1cdca0 100644 --- a/examples/disassemble/package.json +++ b/examples/disassemble/package.json @@ -17,6 +17,6 @@ "@wasmer/wasi": "^0.12.0", "@wasmer/wasm-transformer": "^0.10.0", "@wasmer/wasmfs": "^0.12.0", - "@aptos/move-js": "../../" + "@aptos-labs/move-js": "../../" } } diff --git a/examples/disassemble/src/main.ts b/examples/disassemble/src/main.ts index 26205582..afc18556 100644 --- a/examples/disassemble/src/main.ts +++ b/examples/disassemble/src/main.ts @@ -1,7 +1,7 @@ import './style.css' import { WasmFs } from '@wasmer/wasmfs' -import { Disassemble } from '@aptos/move-js' +import { Disassemble } from '@aptos-labs/move-js' const startDisassembleTask = async (app: HTMLDivElement) => { const wasmfs = new WasmFs() diff --git a/examples/disassemble/yarn.lock b/examples/disassemble/yarn.lock index e1f88fc7..2be40569 100644 --- a/examples/disassemble/yarn.lock +++ b/examples/disassemble/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@aptos/move-js@../../": +"@aptos-labs/move-js@../../": version "0.7.1" dependencies: "@iarna/toml" "^2.2.5" diff --git a/examples/my-counter/package.json b/examples/my-counter/package.json index f82df78d..9eeb8fbc 100644 --- a/examples/my-counter/package.json +++ b/examples/my-counter/package.json @@ -17,6 +17,6 @@ "@wasmer/wasi": "^0.12.0", "@wasmer/wasm-transformer": "^0.10.0", "@wasmer/wasmfs": "^0.12.0", - "@aptos/move-js": "../../" + "@aptos-labs/move-js": "../../" } } diff --git a/examples/my-counter/src/main.ts b/examples/my-counter/src/main.ts index 5cdcb3ba..ca233d11 100644 --- a/examples/my-counter/src/main.ts +++ b/examples/my-counter/src/main.ts @@ -1,7 +1,7 @@ import './style.css' import { WasmFs } from '@wasmer/wasmfs' -import { Git, MovePackage } from '@aptos/move-js' +import { Git, MovePackage } from '@aptos-labs/move-js' const startWasiTask = async (app: HTMLDivElement) => { const wasmfs = new WasmFs() diff --git a/examples/my-counter/yarn.lock b/examples/my-counter/yarn.lock index e1f88fc7..2be40569 100644 --- a/examples/my-counter/yarn.lock +++ b/examples/my-counter/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@aptos/move-js@../../": +"@aptos-labs/move-js@../../": version "0.7.1" dependencies: "@iarna/toml" "^2.2.5" diff --git a/package.json b/package.json index 94071a22..00afab32 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@aptos/move-js", + "name": "@movefuns/move-js", "version": "0.7.1", "description": "Javascript version of the Move language compiler, supports compiling Move code into Move bytecode in the browser.", "keywords": [ @@ -21,7 +21,10 @@ ], "repository": { "type": "git", - "url": "https://github.com/aptos-labs/move-js" + "url": "https://github.com/movefuns/move-js" + }, + "publishConfig": { + "registry": "https://npm.pkg.github.com/" }, "main": "dist/index.cjs.js", "module": "dist/index.esm.js",