-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Flutter CI | ||
|
||
# This workflow is triggered on pushes to the repository. | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
# This job will run on macos virtual machine | ||
runs-on: macos-13 | ||
steps: | ||
|
||
# Setup Java environment in order to build the Android app. | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'gradle' | ||
# Setup the flutter environment. | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' # 'dev', 'alpha', default to: 'stable' | ||
# flutter-version: '1.22.x' # you can also specify exact version of flutter | ||
|
||
# Get flutter dependencies. | ||
- run: flutter pub get | ||
|
||
# Check for any formatting issues in the code. | ||
- run: dart format --set-exit-if-changed . | ||
|
||
# Statically analyze the Dart code for any errors. | ||
- run: dart analyze . | ||
|
||
##### | ||
# Build app | ||
##### | ||
# Build apk. | ||
- run: cd example && flutter build apk | ||
# Build ios | ||
- run: cd example && flutter build ios --no-codesign |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract version from tag | ||
id: extract_version | ||
run: | | ||
VERSION=${GITHUB_REF#refs/tags/v} | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Read release notes | ||
id: release_notes | ||
run: | | ||
VERSION=${{ env.VERSION }} | ||
CHANGELOG=$(sed -n "/## $VERSION/,/^## /p" CHANGELOG.md | sed '$d' | tail -n +2) | ||
if [ -z "$CHANGELOG" ]; then | ||
echo "Release notes not found for version $VERSION" | ||
exit 1 | ||
fi | ||
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | ||
echo "$CHANGELOG" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
body: ${{ env.RELEASE_NOTES }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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