Skip to content

Instantly share code, notes, and snippets.

@mahmoudalaa97
Created October 16, 2021 11:05
Show Gist options
  • Save mahmoudalaa97/e9e7048da9fc7b1c836a028bc5f684d3 to your computer and use it in GitHub Desktop.
Save mahmoudalaa97/e9e7048da9fc7b1c836a028bc5f684d3 to your computer and use it in GitHub Desktop.

Revisions

  1. @devhammed devhammed revised this gist Sep 10, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ jobs:
    runs-on: macos-latest
    steps:
    - name: Export Release Timestamp
    run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%m.%S')" >> $GITHUB_ENV
    run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%M.%S')" >> $GITHUB_ENV
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Set up Java
  2. @devhammed devhammed revised this gist Jun 23, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ jobs:
    runs-on: macos-latest
    steps:
    - name: Export Release Timestamp
    run: echo "APP_VERSION=release_$(date +'%Y-%m-%d_%H-%m-%S')" >> $GITHUB_ENV
    run: echo "APP_VERSION=v$(date +'%Y.%m.%d.%H.%m.%S')" >> $GITHUB_ENV
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Set up Java
  3. @devhammed devhammed revised this gist Jun 23, 2021. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -16,12 +16,12 @@ jobs:
    - name: Set up Java
    uses: actions/setup-java@v2
    with:
    java-version: 15
    distribution: adopt
    java-version: '15'
    distribution: 'adopt'
    - name: Set up Flutter
    uses: subosito/flutter-action@v1
    with:
    channel: "stable"
    channel: 'stable'
    - name: Install pub Dependencies
    run: flutter pub get
    - name: Run Tests
    @@ -48,4 +48,4 @@ jobs:
    tag: ${{ env.APP_VERSION }}
    name: ${{ env.APP_VERSION }}
    token: ${{ secrets.GITHUB_TOKEN }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa,build/web/web-app.zip"
    artifacts: 'build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa,build/web/web-app.zip'
  4. @devhammed devhammed revised this gist Jun 23, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -14,9 +14,10 @@ jobs:
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Set up Java
    uses: actions/setup-java@v1
    uses: actions/setup-java@v2
    with:
    java-version: "12.x"
    java-version: 15
    distribution: adopt
    - name: Set up Flutter
    uses: subosito/flutter-action@v1
    with:
  5. @devhammed devhammed revised this gist Nov 22, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ jobs:
    runs-on: macos-latest
    steps:
    - name: Export Release Timestamp
    run: echo "::set-env name=APP_VERSION::release_$(date +'%Y-%m-%d_%H-%m-%S')"
    run: echo "APP_VERSION=release_$(date +'%Y-%m-%d_%H-%m-%S')" >> $GITHUB_ENV
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Set up Java
  6. @devhammed devhammed revised this gist Aug 3, 2020. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -36,10 +36,15 @@ jobs:
    ln -s ../Runner.app
    cd ..
    zip -r app.ipa Payload
    - name: Build Web App
    run: |
    flutter build web
    cd build/web
    zip -r web-app.zip .
    - name: Release Apps
    uses: ncipollo/release-action@v1
    with:
    tag: ${{ env.APP_VERSION }}
    name: ${{ env.APP_VERSION }}
    token: ${{ secrets.GITHUB_TOKEN }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa,build/web/web-app.zip"
  7. @devhammed devhammed revised this gist Mar 6, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -42,4 +42,4 @@ jobs:
    tag: ${{ env.APP_VERSION }}
    name: ${{ env.APP_VERSION }}
    token: ${{ secrets.GITHUB_TOKEN }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
  8. @devhammed devhammed revised this gist Mar 6, 2020. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,15 @@ jobs:
    name: Build Apps
    runs-on: macos-latest
    steps:
    - name: Export Release Timestamp
    run: echo "::set-env name=APP_VERSION::release_$(date +'%Y-%m-%d_%H-%m-%S')"
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Setup Java
    - name: Set up Java
    uses: actions/setup-java@v1
    with:
    java-version: "12.x"
    - name: Setup Flutter
    - name: Set up Flutter
    uses: subosito/flutter-action@v1
    with:
    channel: "stable"
    @@ -34,12 +36,10 @@ jobs:
    ln -s ../Runner.app
    cd ..
    zip -r app.ipa Payload
    - name: Export Release Timestamp
    run: echo "::set-env name=APP_VERSION::release_$(date +'%Y-%m-%d_%H-%m-%S')"
    - name: Release Apps
    uses: ncipollo/release-action@v1
    with:
    tag: ${{ env.APP_VERSION }}
    name: ${{ env.APP_VERSION }}
    token: ${{ secrets.GITHUB_TOKEN }}
    name: Release ${{ env.APP_VERSION }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
  9. @devhammed devhammed revised this gist Mar 6, 2020. 1 changed file with 6 additions and 2 deletions.
    8 changes: 6 additions & 2 deletions build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,8 @@ jobs:
    channel: "stable"
    - name: Install pub Dependencies
    run: flutter pub get
    - name: Run Tests
    run: flutter test
    - name: Build Android App
    run: flutter build apk --split-per-abi
    - name: Build iOS App
    @@ -32,10 +34,12 @@ jobs:
    ln -s ../Runner.app
    cd ..
    zip -r app.ipa Payload
    - name: Export Release Timestamp
    run: echo "::set-env name=APP_VERSION::release_$(date +'%Y-%m-%d_%H-%m-%S')"
    - name: Release Apps
    uses: ncipollo/release-action@v1
    with:
    tag: ${{ github.sha }}
    tag: ${{ env.APP_VERSION }}
    token: ${{ secrets.GITHUB_TOKEN }}
    name: Release ${{ github.sha }}
    name: Release ${{ env.APP_VERSION }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"
  10. @devhammed devhammed created this gist Mar 6, 2020.
    41 changes: 41 additions & 0 deletions build-and-release.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    on:
    push:
    branches:
    - master

    name: Build and Release Apps
    jobs:
    build:
    name: Build Apps
    runs-on: macos-latest
    steps:
    - name: Checkout repository
    uses: actions/checkout@v1
    - name: Setup Java
    uses: actions/setup-java@v1
    with:
    java-version: "12.x"
    - name: Setup Flutter
    uses: subosito/flutter-action@v1
    with:
    channel: "stable"
    - name: Install pub Dependencies
    run: flutter pub get
    - name: Build Android App
    run: flutter build apk --split-per-abi
    - name: Build iOS App
    run: |
    flutter build ios --no-codesign
    cd build/ios/iphoneos
    mkdir Payload
    cd Payload
    ln -s ../Runner.app
    cd ..
    zip -r app.ipa Payload
    - name: Release Apps
    uses: ncipollo/release-action@v1
    with:
    tag: ${{ github.sha }}
    token: ${{ secrets.GITHUB_TOKEN }}
    name: Release ${{ github.sha }}
    artifacts: "build/app/outputs/apk/release/*.apk,build/ios/iphoneos/app.ipa"