Skip to content

chore(deps): update dependencies (#531) #399

chore(deps): update dependencies (#531)

chore(deps): update dependencies (#531) #399

Workflow file for this run

name: ci-main
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-repo:
uses: ./.github/workflows/check-repo.yml
with:
check-release-examples: false
publish-crates:
name: Publish crates
runs-on: ubuntu-22.04
environment: main
needs: [ release-please, check-repo ]
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
- name: Remove latest example Cargo.tomls while publishing
working-directory: substrate
run: |
find examples/latest -name Cargo.toml -delete && \
sed -ri.bak 's/\"examples\/latest\/[a-zA-Z0-9_-]*\",?//g' Cargo.toml
- 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
check-release-examples:
uses: ./.github/workflows/check-workspace.yml
needs: [ publish-crates ]
with:
workspace_path: examples/release
deploy-api-docs:
uses: ./.github/workflows/deploy-api-docs.yml
secrets: inherit
deploy-docs:
uses: ./.github/workflows/deploy-docs.yml
secrets: inherit