Skip to content

Commit

Permalink
Cleanup release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
a-mabe committed Jan 3, 2025
1 parent ccbcac8 commit 9249c68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yaml
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 🚀

Expand Down
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

Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand All @@ -164,7 +135,7 @@ jobs:
CreateDraftRelease:
runs-on: ubuntu-latest
needs: [BuildAndroidRelease, BuildiOSRelease, GetVersionNumber]
needs: [BuildAndroidRelease, BuildiOSRelease]
permissions:
contents: write
steps:
Expand All @@ -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

0 comments on commit 9249c68

Please sign in to comment.