Skip to content

Commit

Permalink
Ci/automate changelog publishing (#1879)
Browse files Browse the repository at this point in the history
* refactor(changelog): migrate the data of CHANGELOG.md to CHANGELOG.json

* refactor(update-version-script): update the script to generate the markdown files from a json file that contains the data to allow automate the CHANGELOG.md for the packages easier in CI, add a comment that indicate those files are generated.

* chore: generate the CHANGELOG.md files using the script

* chore: remove the sh script as it's no longer used

* chore: renmae the script regenerate_versions.dart to update_package_version.dart

* docs: update the development notes to reflect the new changes

* ci: update the publish workflow to pass the release notes to the script (update_package_version.dart)

* chore: rename CHANGELOG.json to CHANGELOG_DATA.json to fix conflicting with CHANGELOG.md by pub publish --dry-run

* docs: update the development notes to reflect the new renaming of CHANGELOG.json

* chore: update the script to reflect the change of renaming CHANGELOG.json to CHANGELOG_DATA.json

* chore: regenerate the CHANGELOG.md files to update the comment at the start
  • Loading branch information
ellet0 committed May 19, 2024
1 parent 9e70817 commit 0edb4b9
Show file tree
Hide file tree
Showing 12 changed files with 1,092 additions and 83 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
# - 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

# TODO: We might automate updating the CHANGELOG.md for all the packages too (update Development notes too if you did)
# Before publishing the new packages, update the version for all the packages first

# Extract version from the tag (handles the 'v' prefix)
Expand All @@ -67,8 +66,12 @@ jobs:
exit 1
fi
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2

- name: Update the version & CHANGELOG for all the packages
run: dart ./scripts/regenerate_versions.dart ${{ steps.extract_version.outputs.VERSION }}
run: dart ./scripts/update_package_version.dart ${{ steps.extract_version.outputs.VERSION }} ${{ steps.extract-release-notes.outputs.release_notes }}

- name: Commit the changes of the updated version & CHANGELOG for all the packages
id: auto-commit-action
Expand Down
Loading

0 comments on commit 0edb4b9

Please sign in to comment.