Skip to content

Commit 5d096a9

Browse files
Merge pull request #1096 from zino-hofmann/macros/graphql_v5.0.2-beta.8
packages: prepare graphql v5.1.0
2 parents 56aa8f4 + 75bf5c3 commit 5d096a9

File tree

11 files changed

+74
-14
lines changed

11 files changed

+74
-14
lines changed

.github/workflows/graphql_flutter_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
types: [created]
66
tags:
77
- graphql_flutter-v*
8-
- v*
98
pull_request:
109
workflow_run:
1110
workflows:
1211
- "graphql-flutter Dart Code sanity check"
1312
- "graphql-flutter Tests case"
13+
- "graphql Release Package"
1414
branches: [ main ]
1515
types:
1616
- completed

.github/workflows/graphql_release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
types: [created]
66
tags:
77
- graphql-v*
8-
- v*
98
pull_request:
109
workflow_run:
1110
workflows:
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish packages to pub.dev
2+
3+
on:
4+
release:
5+
types: [created]
6+
tags:
7+
- v*
8+
jobs:
9+
publishing_client:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: 'Checkout'
13+
uses: actions/checkout@v2
14+
- name: 'graphql publish to to Pub.dev'
15+
uses: k-paxian/dart-package-publisher@master
16+
with:
17+
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
18+
flutter: false
19+
skipTests: true
20+
dryRunOnly: ${{ github.event_name != 'release' }}
21+
relativePath: './packages/graphql/'
22+
publishing_flutter:
23+
runs-on: ubuntu-latest
24+
needs:
25+
- publishing_client
26+
steps:
27+
- name: 'Checkout'
28+
uses: actions/checkout@v2
29+
# FIXME: when we bump a new release, we can have problem
30+
# in dry mode because the new release is not on the pub.dev
31+
# yet
32+
# TODO: we need to have some bump function for dart in the changelog.dat tool.
33+
- name: 'graphql_flutter publish to to Pub.dev'
34+
uses: k-paxian/dart-package-publisher@master
35+
with:
36+
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
37+
flutter: false
38+
skipTests: true
39+
dryRunOnly: ${{ github.event_name != 'release' }}
40+
relativePath: './packages/graphql_flutter/'

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
CC=dart pub global run melos
22
CC_TEST=spec
3+
CC_CHANGELOG=dart pub global run changelog_cmd
34

45
default: analyze check
56

67
dep:
78
dart pub global activate melos;
89
dart pub global activate spec_cli;
10+
dart pub global activate changelog_cmd;
911
$(CC) bootstrap
1012

1113
check:
@@ -39,6 +41,14 @@ check_client: ci_fmt_client ci_check_client
3941

4042
check_flutter: ci_fmt_flutter ci_check_flutter
4143

44+
changelog_client:
45+
cd packages/graphql && $(CC_CHANGELOG)
46+
47+
changelog_flutter:
48+
cd packages/graphql_flutter && $(CC_CHANGELOG)
49+
50+
changelog: changelog_client changelog_flutter
51+
4252
ci: dep check_client check_flutter
4353

4454
clean:

docs/dev/MAINTAINERS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,18 @@ all together.
136136

137137
To prepare the release the following steps are required:
138138

139-
- Bump the version number in the package before the release;
139+
- Bump the version number in the package before the release, and the version inside the `changelog.json` in the package root;
140140
- Generate the changelog related to the package:
141-
- We use the [changelog.dat](https://github.com/vincenzopalazzo/changelog.dart/releases) to generate the correct CHANGELOG from the Github API.
142-
- To use the changelog tools you need to run the following commands inside the package directory
143-
```
144-
export GITHUB_TOKEN="your_token"
145-
changelog-cli -p {package_name} -v v{version_number} -g zino-hofmann/graphql-flutter -b main -m header
146-
# create the CHANGELOG.md file, if already exist it will join the result, so it is important ran the tool inside the package directory
147-
```
141+
- `export GITHUB_TOKEN="your_token"`
142+
- `make {changelog_client|changelog_flutter|changelog}`, where
143+
- `changelog_client`: generate the changelog for graphql;
144+
- `changelog_flutter`: generate the changelog for graphql_flutter;
145+
- `changelog`: generate both changelos.
148146
- Make the Github release: To release a single package we need to create a release with the following tag `{package_name}-v{version_number}`, and
149147
if we make a release with the tag `v{version_number}` this will release all the packages (useful for a major release of the package).
150148

149+
150+
151151
>Programs must be written for people to read, and only incidentally for machines to execute.
152152
> - Someone
153153

packages/graphql/.pubignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
test
2+
*.json

packages/graphql/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# v5.1.0
2+
3+
## New Feature
4+
- Hive integration ([commit](https://github.com/zino-hofmann/graphql-flutter/commit/a8726cb41e1b98e9aaeb8ac3bf7192368de68981)). @budde377 03-04-2022
5+
6+
## Fixes
7+
- subscription hook return an uninitialized stream (https://github.com/zino-hofmann/graphql-flutter/commit/ebc4abd86b72b75ffe4e26a2f412411ab7dd2993). @PainteR 25-03-2022
8+
- Stricter analysis (https://github.com/zino-hofmann/graphql-flutter/commit/131ea1f78b55554f730269f94aad11fb1d07cc44). @budde377 19-03-2022
9+
110
# v5.0.2-beta.8
211

312
## Fixes

packages/graphql/changelog.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"package_name": "graphql",
3-
"version": "v5.0.2-beta.8",
3+
"version": "v5.1.0",
44
"api": {
55
"name": "github",
66
"repository": "zino-hofmann/graphql-flutter",

packages/graphql/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: graphql
22
description: A stand-alone GraphQL client for Dart, bringing all the features from a modern GraphQL client to one easy to use package.
3-
version: 5.0.2-beta.8
3+
version: 5.1.0
44
homepage: https://github.com/zino-app/graphql-flutter/tree/master/packages/graphql
55
dependencies:
66
meta: ^1.3.0
@@ -23,7 +23,7 @@ dependencies:
2323
dev_dependencies:
2424
async: ^2.5.0
2525
mockito: ^5.0.0
26-
test: ^1.18.2
26+
test: ^1.16.0
2727
coverage: ^1.0.3
2828
http_parser: ^4.0.0
2929
lints: ^1.0.1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
test
2+
*.json

0 commit comments

Comments
 (0)