docs(publishing): update the development notes to reflect the changes, update the todo in the publish.yml file

pull/1878/head
Ellet 11 months ago
parent 6de04978db
commit 503ad46dcc
  1. 6
      .github/workflows/publish.yml
  2. 9
      doc/development_notes.md

@ -44,7 +44,7 @@ jobs:
# - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN". # - name: Update the authorization requests to "https://pub.dev" to use the environment variable "PUB_TOKEN".
# run: dart pub token add https://pub.dev --env-var PUB_TOKEN # run: dart pub token add https://pub.dev --env-var PUB_TOKEN
# TODO: We might automate updating the CHANGELOG.md for all the packages too # TODO: We might automate updating the CHANGELOG.md for all the packages too (update development_notes.md too if you did)
# Before publishing the new packages, update the version for all the packages first # Before publishing the new packages, update the version for all the packages first
# Extract version from the tag (handles optional 'v' prefix) # Extract version from the tag (handles optional 'v' prefix)
@ -54,10 +54,10 @@ jobs:
version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/\(.*\)$/\1/') version=$(echo ${GITHUB_REF} | sed 's/^refs\/tags\/\(.*\)$/\1/')
echo ::set-output name=VERSION::${version} echo ::set-output name=VERSION::${version}
- name: Update the version for all the packages - name: Update the version & CHANGELOG for all the packages
run: ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }} run: ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }}
- name: Commit the changes of updating version for all the packages - name: Commit the changes of updating version & CHANGELOG for all the packages
uses: stefanzweifel/git-auto-commit-action@v5 uses: stefanzweifel/git-auto-commit-action@v5
with: with:
commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}" commit_message: "chore(version): update to version ${{ steps.extract_version.outputs.VERSION }}"

@ -1,9 +1,8 @@
# Development notes # Development notes
- When updating the translations or localizations in the app, please take a look at the [Translation](./translation.md) page as it has important notes in order to work, if you also add a feature that adds new localizations then you need to the instructions of it in order for the translations to take effect - When updating the translations or localizations in the app, please take a look at the [Translation](./translation.md) page as it has important notes in order to work, if you also add a feature that adds new localizations then you need to the instructions of it in order for the translations to take effect
- Only update the `version.dart` and `CHANGELOG.md` at the root folder of the repo, then run the script: - We use the same package version and `CHANGELOG.md` for all the packages, for more [details](https://github.com/singerdmx/flutter-quill/pull/1878), the process is automated. We have a script that will do the followings:
1. Copy the contents of the root `CHANGELOG.md` file into all the `CHANGELOG.md` of the packages (overwrite), you need to mention the changes of all the packages in the `CHANGELOG.md` of the root folder as it will be copied, we still have to mention the new changes in the `CHANGELOG.md` and update it as it's not automated yet.
2. The script require the new version as an argument, you don't need to run the script manually, when a maintainer create a new tag and publish a new GitHub release, the publish workflow will extract the new version from the tag name, run the script (pass the extracted version as an argument), commit the changes and push them into the repository, the script will update the `version` property for all the packages so the `flutter pub publish` will use the new version for each package correctly.
```console the script will be used the CI and no need to run it manually
dart ./scripts/regenerate_versions.dart
```
You must mention the changes of the other packages in the repo in the root `CHANGELOG.md` only and the script will replace the `CHANGELOG.md` in the other packages with the root one, and change the version in `pubspec.yaml` with the one in `version.dart` in the root folder
Loading…
Cancel
Save