-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
154 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: build-webhapps | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-webhapps: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Install npm dependencies | ||
- name: Install npm dependencies | ||
shell: bash | ||
run: | | ||
npm install | ||
# Download submodules | ||
- name: Download submodules | ||
shell: bash | ||
run: | | ||
npm run install:submodules | ||
# install rust tools | ||
- name: install rust tools | ||
shell: bash | ||
run: | | ||
npm run install:rust | ||
# install hc tool | ||
- name: Install hc tool | ||
shell: bash | ||
run: | | ||
npm run install:hc | ||
# Install hash-zome | ||
- name: Install hash-zome | ||
run: | | ||
npm run install:hash-zome | ||
# Build happ | ||
- name: Build happ | ||
shell: bash | ||
run: | | ||
npm run build:happ | ||
# Build webapp | ||
- name: Build webapp | ||
run: | | ||
npm run build:webapp | ||
# Package web-happ | ||
- name: Package web-happ | ||
run: | | ||
npm run package:webapp | ||
# build we-applet | ||
- name: build we-applet | ||
shell: bash | ||
run: | | ||
npm run build -w we-applet | ||
# Package we-applet | ||
- name: Package we-applet | ||
shell: bash | ||
run: | | ||
npm run package:we-applet | ||
# Regroup artifacts | ||
- name: Regroup artifacts | ||
run: | | ||
cp target/wasm32-unknown-unknown/release/threads_integrity_zome.wasm ./artifacts | ||
cp target/wasm32-unknown-unknown/release/threads_zome.wasm ./artifacts | ||
cp target/wasm32-unknown-unknown/release/profiles_zome.wasm ./artifacts | ||
cp target/wasm32-unknown-unknown/release/profiles_integrity_zome.wasm ./artifacts | ||
# List uploaded files | ||
- name: List uploaded files | ||
run: ls -R | ||
working-directory: ./artifacts | ||
# "upload" artifacts | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: all-happ-artifact | ||
path: artifacts/ |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Release x64 | ||
|
||
on: | ||
push: | ||
tags: | ||
- v[0-9]+.* | ||
|
||
jobs: | ||
call-build: | ||
uses: ./.github/workflows/build-webhapps.yml | ||
secrets: inherit | ||
|
||
# upload the artifacts | ||
upload-assets: | ||
needs: call-build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Download previously uploaded artifacts | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: all-happ-artifact | ||
path: artifacts | ||
# Display artifacts folder | ||
- name: Display artifacts folder | ||
run: ls | ||
working-directory: artifacts | ||
# upload all artifacts | ||
- name: upload binary (ubuntu only) | ||
if: ${{ runner.os == 'Linux' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: artifacts | ||
run: | | ||
rm -f *.blockmap | ||
echo threads* | ||
gh release upload "${GITHUB_REF#refs/tags/}" threads* --clobber | ||
echo Threads* | ||
gh release upload "${GITHUB_REF#refs/tags/}" Threads* --clobber | ||
echo profiles* | ||
gh release upload "${GITHUB_REF#refs/tags/}" profiles_zome.wasm --clobber | ||
gh release upload "${GITHUB_REF#refs/tags/}" profiles_integrity_zome.wasm --clobber |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: test-workflow x64 | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
call-build: | ||
uses: ./.github/workflows/build-webhapps.yml | ||
secrets: inherit | ||
|
||
# upload the artifacts | ||
upload-assets: | ||
needs: call-build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# Download previously uploaded artifacts | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: all-happ-artifact | ||
path: artifacts | ||
# Display artifacts folder | ||
- name: Display artifacts folder | ||
run: ls | ||
working-directory: artifacts | ||
# upload all artifacts | ||
- name: upload binary (ubuntu only) | ||
if: ${{ runner.os == 'Linux' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: artifacts | ||
run: | | ||
rm -f *.blockmap | ||
echo threads* | ||
gh release upload "manual-release" threads* --clobber | ||
echo Threads* | ||
gh release upload "manual-release" Threads* --clobber | ||
echo profiles* | ||
gh release upload "manual-release" profiles_zome.wasm --clobber | ||
gh release upload "manual-release" profiles_integrity_zome.wasm --clobber |