Skip to content

Commit

Permalink
Merge pull request #14 from wangeguo/main
Browse files Browse the repository at this point in the history
chore: add new workflow for publish packgae to ghcr.io
  • Loading branch information
uvd authored Feb 2, 2024
2 parents 69333a3 + 788e76c commit 381fc3a
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 12 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/disassemble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "../../"
}
}
2 changes: 1 addition & 1 deletion examples/disassemble/src/main.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/disassemble/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


"@aptos/move-js@../../":
"@aptos-labs/move-js@../../":
version "0.7.1"
dependencies:
"@iarna/toml" "^2.2.5"
Expand Down
2 changes: 1 addition & 1 deletion examples/my-counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "../../"
}
}
2 changes: 1 addition & 1 deletion examples/my-counter/src/main.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/my-counter/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# yarn lockfile v1


"@aptos/move-js@../../":
"@aptos-labs/move-js@../../":
version "0.7.1"
dependencies:
"@iarna/toml" "^2.2.5"
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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",
Expand Down

0 comments on commit 381fc3a

Please sign in to comment.