diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 11ee27d7..92e6db33 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,3 +42,41 @@ jobs: uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} + prepare-release: + runs-on: ubuntu-latest + if: startsWith(github.head_ref, 'release-v') + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Extract version from branch + id: extract_version + run: | + branch_name="${{ github.head_ref }}" + version="${branch_name#release-v}" + echo "version=v$version" >> $GITHUB_ENV + - name: Generate changelog + uses: orhun/git-cliff-action@v4 + with: + config: cliff.toml + args: --tag ${{ env.version }} + env: + OUTPUT: CHANGELOG.md + GITHUB_REPO: ${{ github.repository }} + - name: Commit Changelog + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + git checkout ${{ github.head_ref }} + git add CHANGELOG.md + git commit -m "Update CHANGELOG for version ${{ env.version }}" + git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ github.head_ref }} + - name: Update version in pubspec.yaml + run: | + version_without_v=${{ env.version }} + version_without_v=${version_without_v#v} + sed -i "s/^version: .*/version: $version_without_v/" pubspec.yaml + git add pubspec.yaml + git commit -m "Update pubspec.yaml version to ${{ env.version }}" + git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git ${{ github.head_ref || github.ref_name }} + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..f0808b04 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog + +## [0.1.1] - 2024-12-20 + +### 🚀 Features + +- *(windows)* Configure Windows release settings (#59) +- *(ui)* Add opt-out screen on app startup (#57) +- *(ui)* Add privacy policy to application detail page (#56) +- *(ui)* Add licenses page and update legal page (#54) +- *(api)* Support v6 (#42) +- *(sentry)* Add screenshot support (#44) +- *(logger)* Add support for 'off' log level in logger configuration (#43) +- *(security)* Store secure data in secure storage (#31) +- *(ui)* Add button for switching between v5 and v6 (v6 disabled for now) (#27) +- *(logo)* Update app icon (#26) +- Add language setting page (#4) + +### 🐛 Bug Fixes + +- Correct error when updating server information (#8) +- Resolve Dart warnings +- Adjust colors of home widgets to match pihole web ui + +### 🚜 Refactor + +- *(ui)* Add description for version selection (#53) +- *(api)* Update apigateway (#38) +- *(database)* Remove old database service and new implement (#34) +- *(api)* Move v5 functions to ApiGatewayV5 (#9) +- Remove unused code (#5) + +### ⚙️ Miscellaneous Tasks + +- Add git-cliff + + diff --git a/cliff.toml b/cliff.toml index 7c6e5f36..abe0674e 100644 --- a/cliff.toml +++ b/cliff.toml @@ -9,7 +9,6 @@ # template for the changelog header header = """ # Changelog\n -All notable changes to this project will be documented in this file.\n """ # template for the changelog body # https://keats.github.io/tera/docs/#introduction diff --git a/pubspec.yaml b/pubspec.yaml index 3bf2ac38..1fba2751 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.1.0 +version: 0.1.1 environment: sdk: ">=3.0.0 <4.0.0"