This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
breaking: Simplify code, change to open use license, update readme #6
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. Use of this | |
## source code is governed by an open-use license that can be found in the | |
## LICENSE file located in this project's root directory. | |
## | |
## For more about publishing, see: https://dart.dev/tools/pub/automated-publishing | |
## | |
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | |
##.title~ | |
name: Prepare version | |
## ----------------------------------------------------------------------------- | |
on: | |
push: | |
branches: | |
- main | |
## ----------------------------------------------------------------------------- | |
jobs: | |
prepare: | |
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" | |
- 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 version ${{ steps.get_version.outputs.extracted_version }}" | |
git push |