Update README.md #4
Workflow file for this run
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
| name: Build and Release APK | |
| on: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code from main repository | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: 'main' | |
| - name: Checkout code from another repository | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: ${{ secrets.REPOSITORY }} | |
| path: './docker_copilot' | |
| ref: 'main' | |
| token: ${{ secrets.PERSON_ACCESS_TOKEN }} | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v1 | |
| with: | |
| flutter-version: '3.22.2' | |
| - name: Build APK | |
| run: | | |
| cd ./docker_copilot | |
| flutter pub get | |
| flutter build apk --release | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSON_ACCESS_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| release_name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| - name: Upload Release Asset | |
| id: upload_release_asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.PERSON_ACCESS_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: ./docker_copilot/build/app/outputs/flutter-apk/app-release.apk | |
| asset_name: app-release.apk | |
| asset_content_type: application/vnd.android.package-archive |