-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: auto release for browser env (#455)
- Loading branch information
Showing
2 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,8 +148,68 @@ jobs: | |
path: rings-${{ needs.gen_version.outputs.version }}-${{ steps.target.outputs.target }}.zip | ||
retention-days: 1 | ||
|
||
|
||
|
||
build_browser: | ||
needs: gen_version | ||
name: build browser version binary | ||
timeout-minutes: 25 | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
matrix: | ||
arch: | ||
- wasm32 | ||
platform: | ||
- unknown | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get target | ||
id: target | ||
run: echo 'target=${{ matrix.arch }}-unknown-${{ matrix.platform }}' >> $GITHUB_OUTPUT | ||
|
||
- name: Add target | ||
run: | | ||
rustup target add ${{ steps.target.outputs.target }} | ||
- uses: jetli/[email protected] | ||
with: | ||
version: "0.2.84" | ||
|
||
- name: Install wasm-pack | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: Setup rust toolchain | ||
run: | | ||
rustup show | ||
# If you need to reset the cache version, increment the number after `v` | ||
- uses: Swatinem/rust-cache@v1 | ||
with: | ||
sharedKey: auto-release-${{ steps.target.outputs.target }}-v1 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build | ||
run: | | ||
npm run prepare | ||
npm pack | ||
mv ringsnetwork-rings-node-*.tgz rings-${{ needs.gen_version.outputs.version }}-${{ steps.target.outputs.target }}.tgz | ||
- uses: actions/upload-artifact@v3 | ||
name: Upload artifacts | ||
with: | ||
path: rings-${{ needs.gen_version.outputs.version }}-${{ steps.target.outputs.target }} | ||
name: rings-${{ needs.gen_version.outputs.version }}-${{ steps.target.outputs.target }}.tgz | ||
retention-days: 1 | ||
|
||
|
||
release: | ||
needs: [gen_version, build_macos, build_linux] | ||
needs: [gen_version, build_macos, build_linux, build_browser] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -173,3 +233,4 @@ jobs: | |
rings-${{ needs.gen_version.outputs.version }}-x86_64-unknown-linux-musl/*.zip | ||
rings-${{ needs.gen_version.outputs.version }}-x86_64-apple-darwin/*.zip | ||
rings-${{ needs.gen_version.outputs.version }}-aarch64-apple-darwin/*.zip | ||
rings-${{ needs.gen_version.outputs.version }}-wasm32-unknown-unknown/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
"RND <[email protected]>" | ||
], | ||
"description": "Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.\n", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"license": "GPL-3.0", | ||
"repository": { | ||
"type": "git", | ||
|