first commit #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##.title | |
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | |
## | |
## Dart/Flutter (DF) Packages by DevCetra.com & contributors. | |
## | |
## See MIT LICENSE file in the root directory. | |
## | |
## For more about publishing, see: https://dart.dev/tools/pub/automated-publishing | |
## | |
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | |
##.title~ | |
name: Prepare for release | |
## ----------------------------------------------------------------------------- | |
on: | |
push: | |
branches: | |
- main | |
## ----------------------------------------------------------------------------- | |
jobs: | |
update-changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1.2 | |
- name: Format Dart code | |
run: dart format . | |
- name: Apply Dart fixes | |
run: dart fix --apply | |
- name: Extract version from pubspec.yaml | |
id: get_version | |
run: | | |
VERSION=$(grep "version:" pubspec.yaml | sed 's/version: //') | |
echo "Extracted version: $VERSION" | |
echo "::set-output name=extracted_version::$VERSION" | |
- name: Get commit messages | |
id: get_commits | |
run: | | |
COMMIT_MESSAGES=$(git log --format=%B -n 1 HEAD) | |
echo "::set-output name=messages::${COMMIT_MESSAGES}" | |
- name: Update CHANGELOG.md | |
run: | | |
RELEASE_NOTES="${{ steps.get_commits.outputs.messages }}" | |
dart run .github/scripts/update_changelog.dart "${{ steps.get_version.outputs.extracted_version }}" "$RELEASE_NOTES" | |
shell: bash | |
- name: Commit and push changes | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Prepare release for version ${{ steps.get_version.outputs.extracted_version }}" | |
git push |