feat(atoll): add functions for creating named instances (#446) #366
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: CI | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
release-please: | |
name: Update release PRs | |
runs-on: ubuntu-22.04 | |
environment: main | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: substrate | |
- name: Clone `release-please` | |
uses: actions/checkout@v3 | |
with: | |
repository: rohanku/release-please | |
path: release-please | |
ref: dev | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: release-please/package-lock.json | |
- name: Install `release-please` | |
working-directory: release-please | |
run: npm ci | |
- name: Run release-please | |
working-directory: substrate | |
run: | | |
for command in release-pr github-release; do | |
node ../release-please/build/src/bin/release-please.js --debug "${command}" \ | |
--token ${{ secrets.SUBSTRATE2_CI_TOKEN_MAIN }} \ | |
--repo-url ${{ github.repository }} | |
done | |
check-workspace: | |
uses: ./.github/workflows/check-workspace.yml | |
publish-crates: | |
name: Publish crates | |
runs-on: ubuntu-22.04 | |
environment: main | |
needs: [ release-please, check-workspace ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: substrate | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: toolchain | |
with: | |
toolchain: stable | |
- name: Clone `cargo-workspaces` | |
uses: actions/checkout@v3 | |
with: | |
repository: rohanku/cargo-workspaces | |
path: cargo-workspaces | |
ref: dev | |
- name: Cache workspace | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ steps.toolchain.outputs.cachekey }} | |
workspaces: | | |
./substrate -> target | |
./cargo-workspaces/cargo-workspaces -> target | |
- name: Build `cargo-workspaces` | |
working-directory: cargo-workspaces/cargo-workspaces | |
run: cargo build | |
- uses: extractions/setup-just@v1 | |
- name: Publish crates | |
working-directory: substrate | |
run: ../cargo-workspaces/cargo-workspaces/target/debug/cargo-ws workspaces publish --from-git --token=${{ secrets.KTRA_TOKEN }} --registry=substrate --yes --allow-dirty | |
deploy-api-docs: | |
name: Deploy API documentation | |
runs-on: bwrc | |
environment: main | |
needs: [ check-workspace ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@ddcac349402ef55840d9870785f4df1890768078 | |
- run: just build | |
working-directory: docs/api | |
- run: flyctl deploy --remote-only --detach | |
working-directory: docs/api | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_API }} | |
deploy-docs: | |
name: Deploy documentation | |
runs-on: ubuntu-22.04 | |
environment: main | |
needs: [ check-workspace ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: docs/site/yarn.lock | |
- run: yarn install | |
working-directory: docs/site | |
- run: yarn build | |
working-directory: docs/site | |
- run: flyctl deploy --remote-only --detach | |
working-directory: docs/site | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DOCS }} | |