Release Components #82
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: 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 | |
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 "${{ github.event.inputs.version }}" | |
- name: Update @apollo/composition | |
run: npm i --prefix ./federation-2/harmonizer -E @apollo/composition@${{github.event.inputs.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 | |
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 ./federation-2/router-bridge @apollo/federation-internals@${{github.event.inputs.version}} @apollo/query-planner@${{github.event.inputs.version}} | |
- name: Install Cargo edit | |
run: cargo install cargo-edit | |
- name: Run cargo edit and cargo build | |
run: | | |
echo "${{ github.event.inputs.version }}" | |
cd federation-2 | |
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${{ github.event.inputs.version }} | |
echo "New version " $NEW_VERSION | |
cargo set-version $NEW_VERSION -p router-bridge | |
cargo build -p router-bridge | |
cd router-bridge | |
npm version ${{ github.event.inputs.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 |