This repository was archived by the owner on Oct 12, 2024. It is now read-only.
Organize source code structure and refactor #33
This file contains hidden or 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 | |
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | |
## | |
## 🇽🇾🇿 & Dev | |
## | |
## Copyright Ⓒ Robert Mollentze, xyzand.dev | |
## | |
## Licensing details can be found in the LICENSE file in the root directory. | |
## | |
## ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ | |
##.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 |