add: Issue Templates and fixed CONTRIBUTING miss-spelled #28
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
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| push: | |
| branches: | |
| - develop | |
| name: "Build & Release" | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.2' | |
| channel: 'stable' | |
| architecture: x64 | |
| # Decode Keystore file | |
| - name: Decode Keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks | |
| # Create key.properties | |
| - name: Create key.properties | |
| run: | | |
| echo "storePassword=${{ secrets.KEY_STORE_PASSWORD }}" > android/key.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | |
| echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | |
| echo "storeFile=../app/upload-keystore.jks" >> android/key.properties | |
| # Run Flutter analyze to check for issues | |
| - name: Flutter Analyze | |
| run: flutter analyze | |
| # Run tests before building | |
| - name: Run Tests | |
| run: flutter test | |
| # Build APK for Android | |
| - name: Build APK | |
| run: flutter build apk --release --split-per-abi | |
| - run: | | |
| cd build/app/outputs/apk/release | |
| mv app-armeabi-v7a-release.apk SysAdmin-development.apk | |
| mv app-arm64-v8a-release.apk SysAdmin-arm64-development.apk | |
| mv app-x86_64-release.apk SysAdmin-x86_64-development.apk | |
| # Build IPA for iOS | |
| - name: Build IPA | |
| run: | | |
| flutter build ios --no-codesign | |
| cd build/ios/iphoneos | |
| mkdir Payload | |
| cd Payload | |
| ln -s ../Runner.app | |
| cd .. | |
| zip -r app.ipa Payload | |
| # Step to generate and create the TAG variable | |
| - name: Generate version tag | |
| id: generate_tag | |
| run: echo "TAG=v1.0.$GITHUB_RUN_NUMBER" >> $GITHUB_ENV | |
| # Step to use the TAG variable for release | |
| - name: Push to Releases | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: | | |
| build/app/outputs/apk/release/* | |
| build/ios/iphoneos/app.ipa | |
| token: ${{ secrets.TOKEN }} | |
| tag: ${{ env.TAG }} | |
| name: Release ${{ env.TAG }} | |
| body: ${{ github.event.head_commit.message }} | |
| draft: false | |
| prerelease: false |