refactor: improve dev chain scripts #28
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
name: Capsule Build & Test | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Capsule Build & Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: install capsule | |
run: cargo install ckb-capsule | |
- run: capsule build | |
- run: capsule test | |
build_release: | |
name: Capsule Build for Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
- name: install capsule | |
run: cargo install ckb-capsule | |
- run: capsule build --release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build-release | |
path: build/release | |
release: | |
name: Release Contract | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: build_release | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build-release | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: joyid-cobuild-poc |