Skip to content

Commit 53e8bd5

Browse files
committed
fix release config
fix release ignore dev crates added missing attrs for release init release changelog file fix release-plz and rename other crates
1 parent 0f6e8af commit 53e8bd5

File tree

18 files changed

+81
-36
lines changed

18 files changed

+81
-36
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ test_all = "test --workspace"
77
test_qp = "test --package hive-router-query-planner -- --nocapture"
88
test_qpe = "test --package hive-router-plan-executor -- --nocapture"
99
"clippy:fix" = "clippy --all --fix --allow-dirty --allow-staged"
10-
"router-config" = "run --release -p router-config router-config.schema.json"
10+
"router-config" = "run --release -p hive-router-config router-config.schema.json"

.github/workflows/build.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ env:
3131
jobs:
3232
config:
3333
runs-on: ubuntu-latest
34+
if: github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'v'))
3435
steps:
3536
- name: checkout
3637
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
@@ -61,6 +62,7 @@ jobs:
6162

6263
binary:
6364
name: ${{ matrix.name }}
65+
if: github.event_name == 'push' || github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'v'))
6466
runs-on: ubuntu-latest
6567
strategy:
6668
matrix:
@@ -123,6 +125,7 @@ jobs:
123125
tags: |
124126
type=ref,event=pr
125127
type=semver,pattern={{version}},value=${{ github.event.release.name }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
128+
type=semver,pattern=hive-router-v{{version}},value=${{ github.event.release.name }},enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
126129
type=sha
127130
type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
128131
- name: download binary artifacts

.github/workflows/release.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,35 @@ name: release
33
permissions:
44
pull-requests: write
55
contents: write
6+
id-token: write
67

78
on:
89
push:
910
branches:
1011
- main
1112

1213
jobs:
13-
crates:
14+
publish-crates:
1415
name: crates
1516
runs-on: ubuntu-latest
1617
if: ${{ github.repository_owner == 'graphql-hive' }}
1718
steps:
1819
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1920
- uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
21+
with:
22+
cache: false
23+
- name: Authenticate with crates.io
24+
uses: rust-lang/crates-io-auth-action@v1
25+
id: auth
2026
- name: release-plz release
2127
uses: release-plz/action@f9715bc3b46e211f764f4440a221ddb89ae8abb3 # v0.5.112
2228
with:
2329
command: release
2430
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
32+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
2733

28-
pr:
34+
release-pr:
2935
name: pr
3036
runs-on: ubuntu-latest
3137
if: ${{ github.repository_owner == 'graphql-hive' }}
@@ -35,10 +41,15 @@ jobs:
3541
steps:
3642
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3743
- uses: actions-rust-lang/setup-rust-toolchain@ac90e63697ac2784f4ecfe2964e1a285c304003a # v1
44+
with:
45+
cache: false
46+
- name: Authenticate with crates.io
47+
uses: rust-lang/crates-io-auth-action@v1
48+
id: auth
3849
- name: release-plz release-pr
3950
uses: release-plz/action@f9715bc3b46e211f764f4440a221ddb89ae8abb3 # v0.5.112
4051
with:
4152
command: release-pr
4253
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
54+
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
55+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bench/subgraphs/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "subgraphs"
33
version = "0.0.1"
44
edition = "2021"
5+
publish = false
56

67
[[bin]]
78
name = "subgraphs"

bin/dev-cli/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "qp-dev-cli"
33
edition = "2021"
4+
publish = false
45

56
[[bin]]
67
name = "qp-dev-cli"

bin/router/Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[package]
22
name = "hive-router"
3+
version = "0.0.3"
34
edition = "2021"
5+
description = "GraphQL router/gateway for Federation"
6+
license = "MIT"
7+
publish = true
8+
authors = ["The Guild"]
9+
repository = "https://github.com/graphql-hive/router"
10+
homepage = "https://github.com/graphql-hive/router"
411

512
[lib]
613

@@ -9,9 +16,9 @@ name = "hive_router"
916
path = "src/main.rs"
1017

1118
[dependencies]
12-
hive-router-query-planner = { path = "../../lib/query-planner" }
13-
hive-router-plan-executor = { path = "../../lib/executor" }
14-
router-config = { path = "../../lib/router-config" }
19+
hive-router-query-planner = { path = "../../lib/query-planner", version = "0" }
20+
hive-router-plan-executor = { path = "../../lib/executor", version = "0" }
21+
hive-router-config = { path = "../../lib/router-config", version = "0" }
1522

1623
tokio = { workspace = true }
1724
futures = { workspace = true }

bin/router/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use crate::{
1212
shared_state::RouterSharedState,
1313
};
1414

15+
use hive_router_config::load_config;
1516
use ntex::{
1617
util::Bytes,
1718
web::{self, HttpRequest},
1819
};
19-
use router_config::load_config;
2020

2121
use hive_router_query_planner::utils::parsing::parse_schema;
2222

bin/router/src/logger/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::str::FromStr;
22

3-
use router_config::log::{LogFormat, LoggingConfig};
3+
use hive_router_config::log::{LogFormat, LoggingConfig};
44
use tracing_subscriber::{
55
fmt::{self, format::FmtSpan, time::UtcTime},
66
layer::SubscriberExt,

bin/router/src/shared_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::sync::Arc;
22

33
use graphql_parser::schema::Document;
44
use graphql_tools::validation::{utils::ValidationError, validate::ValidationPlan};
5+
use hive_router_config::HiveRouterConfig;
56
use hive_router_plan_executor::{
67
introspection::schema::{SchemaMetadata, SchemaWithMetadata},
78
SubgraphExecutorMap,
@@ -11,7 +12,6 @@ use hive_router_query_planner::{
1112
state::supergraph_state::SupergraphState,
1213
};
1314
use moka::future::Cache;
14-
use router_config::HiveRouterConfig;
1515

1616
use crate::pipeline::normalize::GraphQLNormalizationPayload;
1717

0 commit comments

Comments
 (0)