-
Notifications
You must be signed in to change notification settings - Fork 23
77 lines (64 loc) · 2.63 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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