diff --git a/.github/release-drafter.yaml b/.github/release-drafter.yaml new file mode 100644 index 0000000..6b80608 --- /dev/null +++ b/.github/release-drafter.yaml @@ -0,0 +1,19 @@ +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' +categories: + - title: '🚀 New Features' + labels: + - 'feature' + - title: '🐛 Bug Fixes' + labels: + - 'bug' + - title: '🛠 Maintenance' + labels: + - 'maintenance' +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +template: | + ## What's Changed + + $CHANGES + + **Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$NEW_TAG \ No newline at end of file diff --git a/.github/workflows/flutter_release.yaml b/.github/workflows/flutter_release.yaml new file mode 100644 index 0000000..dfc19eb --- /dev/null +++ b/.github/workflows/flutter_release.yaml @@ -0,0 +1,64 @@ +name: Flutter Release Workflow + +on: + push: + tags: + - "v*.*.*" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set Up Java + uses: actions/setup-java@v3.12.0 + with: + distribution: "oracle" + java-version: "17" + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: "3.24.1" + channel: "stable" + + - name: Install dependencies + run: flutter pub get + + # - name: Run tests + # run: flutter test + + - name: Build APK + run: flutter build apk --release + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: release-apk + path: build/app/outputs/flutter-apk/app-release.apk + + release: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Generate Release Notes + id: generate_release_notes + uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + + - name: Create GitHub Release + uses: ncipollo/release-action@v1 + with: + artifacts: build/app/outputs/flutter-apk/app-release.apk + token: ${{ secrets.GITHUB_TOKEN }} + name: Release ${{ github.ref }} + tag: ${{ github.ref }} + # body: ${{ steps.generate_release_notes.outputs.notes }} diff --git a/pubspec.yaml b/pubspec.yaml index 3389e2b..aa19f0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.1.0+1 +version: 0.0.1+1 environment: sdk: ">=3.3.4 <4.0.0"