Skip to content

Release Components #106

Release Components

Release Components #106

Workflow file for this run

name: Release Components
on:
workflow_dispatch:
inputs:
version:
type: string
required: true
description: Federation release version
jobs:
harmonizer_pr:
name: Create harmonizer release
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
- name: start
run: echo "$VERSION"
- name: Update @apollo/composition
run: npm i --prefix ./harmonizer -E "@apollo/composition@$VERSION"
# - name: Install Rustup
# run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Run cargo xtask
run: cargo xtask dist --debug
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Automated PR for harmonizer release ${{github.event.inputs.version}}"
branch: create-pull-request/harmonizer
router-bridge_pr:
name: Create router-bridge release
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
# - name: Install Rustup
# run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Update @apollo/federation-internals and @apollo/query-planner
run: npm i --prefix ./router-bridge "@apollo/federation-internals@$VERSION" "@apollo/query-planner@$VERSION"
- name: Install Cargo edit
run: cargo install cargo-edit
- name: Run cargo edit and cargo build
run: |
echo $VERSION
NEW_VERSION=`cargo metadata --format-version 1 |jq -r '.packages[] | select(.name=="router-bridge") | .version' | python3 -c 'import sys; version=sys.stdin.readline().split("+")[0].split("."); version[2] = str(int(version[2]) + 1); print(".".join(version))'`+"v$VERSION"
echo "New version " $NEW_VERSION
cargo set-version $NEW_VERSION -p router-bridge
cargo build -p router-bridge
cd router-bridge
npm version --allow-same-version "$VERSION"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: "Automated PR for router-bridge release ${{github.event.inputs.version}}"
branch: create-pull-request/router-bridge