Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Commit

Permalink
Add Release CI (#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
aurexav authored Jul 18, 2022
1 parent 6ef4439 commit c5677c9
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,20 @@ on:
- "**.ts"

env:
GITHUB_CACHE_VERSION: 3

NODE_VERSION: 12

RUST_TOOLCHAIN: nightly
RUST_BACKTRACE: full
RUSTC_WRAPPER: sccache

SCCACHE_LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: v0.2.15
SCCACHE_DIR: /home/runner/.cache/sccache

SUBALFRED_LINK: https://github.com/hack-ink/subalfred/releases/download
SUBALFRED_VERSION: v0.9.0-rc1
NODE_VERSION: 12
GITHUB_CACHE_VERSION: 3

jobs:
basic-checks:
Expand Down Expand Up @@ -125,8 +129,8 @@ jobs:
drml --ethapi-debug-targets=debug,trace --wasm-runtime-overrides . --unsafe-ws-external --unsafe-rpc-external --rpc-cors all --rpc-methods unsafe --chain pangolin-dev --alice &
# Need some time to start the non-optimized node
sleep 60
- name: Install NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
- name: Install Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Fetch latest code
Expand Down
48 changes: 43 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,48 @@ name: Release
on:
push:
tags:
- "v*"
- v*.*.*

env:
NODE_VERSION: 16

RUST_TOOLCHAIN: nightly

jobs:
build-release:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Prepare release files
run: |
mv target/release/drml .
mv target/release/wbuild/pangolin-runtime/pangolin_runtime.compact.compressed.wasm .
mv target/release/wbuild/pangoro-runtime/pangoro_runtime.compact.compressed.wasm .
tar cf drml.tar.zst drml -I pzstd
- name: Hash
run: sha256sum drml.tar.zst drml pangolin_runtime.compact.compressed.wasm pangoro_runtime.compact.compressed.wasm | tee SHA256
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: |
drml.tar.zst
pangolin_runtime.compact.compressed.wasm
pangoro_runtime.compact.compressed.wasm
SHA256
rustdoc:
name: Rustdoc
runs-on: ubuntu-latest
steps:
Expand All @@ -23,11 +61,11 @@ jobs:
with:
command: doc
args: --all --no-deps --locked
- name: Install Node 16
- name: Install Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install vercel
node-version: ${{ env.NODE_VERSION }}
- name: Install Vercel
run: npm i -g vercel
- name: Deploy Rustdoc
run: |
Expand Down

0 comments on commit c5677c9

Please sign in to comment.