Skip to content

Commit

Permalink
Merge pull request #18 from UnBArqDsw2021-2/185-workflow_release
Browse files Browse the repository at this point in the history
Criando workflow para release
  • Loading branch information
CarlosFiuza authored Apr 13, 2022
2 parents 98b6182 + decdc06 commit e6b93e8
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Release APK

on:
push:
tags:
- '*'

jobs:
release:
name: Release APK
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'

- uses: subosito/flutter-action@v1
with:
flutter-version: '2.10.x'

- name: flutter clean
run: flutter clean

- name: flutter build apk
run: flutter build apk

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release APK
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/app/outputs/flutter-apk/app-release.apk
asset_name: CadernetaCampoDigital.apk
asset_content_type: application/zip

0 comments on commit e6b93e8

Please sign in to comment.