Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into dev
  • Loading branch information
CristivNnn committed May 15, 2023
2 parents 0a9d255 + b8e26f8 commit c8f67b0
Showing 1 changed file with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,65 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Production CI
name: Upload APK as Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
FLUTTER_VERSION: "3.10.0"
TAG_NAME: "1.0.0"
branches:
- main
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v1
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Install dependencies
run: flutter pub get
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: dart analyze
# - run: flutter build apk
# - uses: actions/upload-artifact@v1
# with:
# name: release-apk
# path: build/app/outputs/apk/release/app-release.apk
flutter-version: 3.x

- name: Checkout code
uses: actions/checkout@v2

- name: Create Release Tag
id: create_release_tag
run: echo ::set-output name=tag::v${{ github.run_number }}

- name: Build APK
run: flutter build apk

# - name: Create a Release
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# with:
# tag_name: "v${{ env.TAG_NAME }}"
# release_name: "Release v${{ env.TAG_NAME }}"
# tag_name: v${{ github.run_number }}
# release_name: Release v${{ github.run_number }}
# draft: false
# prerelease: false

# - name: Upload APK as Release Asset
# - name: Upload APK
# id: upload_asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.TOKEN }}
# with:
# upload_url: "${{ steps.create_release.outputs.upload_url }}"
# asset_path: build/app/outputs/apk/release/app-release.apk
# asset_name: app-release.apk
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: build/app/outputs/flutter-apk/app-release.apk
# asset_name: MyApp-v${{ github.run_number }}.apk
# asset_content_type: application/vnd.android.package-archive


# - name: Create a Release APK
# uses: ncipollo/release-action@v1
# with:
# artifacts: "build/app/outputs/apk/release/*.apk"
# token: ${{ secrets.TOKEN }}



- name: Create a Release APK
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*.apk"
tag: ${{ steps.create_release_tag.outputs.tag }}
token: ${{ secrets.TOKEN }}

0 comments on commit c8f67b0

Please sign in to comment.