-
Notifications
You must be signed in to change notification settings - Fork 12
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
2 changed files
with
12 additions
and
40 deletions.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Release Pre-Release | ||
name: Pre-Release OpenHIIT | ||
|
||
run-name: Creating pre-release 🚀 | ||
|
||
|
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 |
---|---|---|
@@ -1,45 +1,22 @@ | ||
name: Build and Release Flutter App | ||
name: Release OpenHIIT | ||
|
||
run-name: ${{ github.actor }} is building Android and iOS releases 🚀 | ||
run-name: ${{ github.actor }} is creating a new release 🚀 | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- VERSION | ||
tags-ignore: | ||
- "*" | ||
tags: | ||
- 'v*.*.*' | ||
- '!*-beta' | ||
|
||
jobs: | ||
|
||
GetVersionNumber: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
outputs: | ||
version: ${{ steps.version.outputs.content }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Read file | ||
id: version | ||
uses: juliangruber/[email protected] | ||
with: | ||
path: VERSION | ||
|
||
- name: Print version | ||
run: echo ${{ steps.version.outputs.content }} | ||
|
||
BuildAndroidRelease: | ||
runs-on: ubuntu-latest | ||
environment: production | ||
needs: GetVersionNumber | ||
permissions: | ||
contents: write | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -51,11 +28,9 @@ jobs: | |
cache: 'gradle' | ||
check-latest: true | ||
|
||
# Checkout the repository code and get packages. | ||
- name: Checkout app code | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Flutter. | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
|
@@ -103,11 +78,9 @@ jobs: | |
permissions: | ||
contents: write | ||
steps: | ||
# Checks-out our repository under $GITHUB_WORKSPACE, so our job can access it | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Flutter. | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
|
@@ -145,11 +118,9 @@ jobs: | |
EXPORT_OPTS_PATH=$RUNNER_TEMP/ExportOptions.plist | ||
echo -n "$EXPORT_OPTIONS_PLIST" | base64 --decode -o $EXPORT_OPTS_PATH | ||
# Build and sign the ipa using a single flutter command | ||
- name: Building IPA | ||
run: flutter build ipa --release --export-options-plist=$RUNNER_TEMP/ExportOptions.plist | ||
|
||
# Collect the file and upload as artifact | ||
|
||
- name: Upload IPA Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -164,7 +135,7 @@ jobs: | |
CreateDraftRelease: | ||
runs-on: ubuntu-latest | ||
needs: [BuildAndroidRelease, BuildiOSRelease, GetVersionNumber] | ||
needs: [BuildAndroidRelease, BuildiOSRelease] | ||
permissions: | ||
contents: write | ||
steps: | ||
|
@@ -188,6 +159,7 @@ jobs: | |
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: "app-release.aab, app-release.apk, workout_timer.ipa" | ||
draft: "true" | ||
tag: ${{needs.GetVersionNumber.outputs.version}} | ||
generateReleaseNotes: "true" | ||
draft: true | ||
tag: ${{ github.ref_name }} | ||
generateReleaseNotes: true | ||
skipIfReleaseExists: true |