mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-04-22 01:57:58 +00:00
4c3920ddae
- Add packageManager field to package.json for corepack - Add .yarnrc.yml with node-modules linker - Update all workflows to use corepack enable + yarn --immutable - Remove yarn cache from actions/setup-node (incompatible with Yarn 4)
77 lines
1.7 KiB
YAML
77 lines
1.7 KiB
YAML
name: Deploy to SubQuery Network
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
inputs:
|
|
project:
|
|
description: 'Project to deploy'
|
|
required: true
|
|
default: 'all'
|
|
type: choice
|
|
options:
|
|
- all
|
|
- pezkuwi
|
|
- pezkuwi-assethub
|
|
|
|
env:
|
|
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }}
|
|
|
|
jobs:
|
|
deploy-pezkuwi:
|
|
if: ${{ github.event_name == 'release' || github.event.inputs.project == 'all' || github.event.inputs.project == 'pezkuwi' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Generate types
|
|
run: yarn codegen
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Publish Pezkuwi Relay
|
|
run: ./node_modules/.bin/subql publish -f pezkuwi.yaml
|
|
|
|
deploy-assethub:
|
|
if: ${{ github.event_name == 'release' || github.event.inputs.project == 'all' || github.event.inputs.project == 'pezkuwi-assethub' }}
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Generate types
|
|
run: yarn codegen
|
|
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
- name: Publish Pezkuwi Asset Hub
|
|
run: ./node_modules/.bin/subql publish -f pezkuwi-assethub.yaml
|