Skip to content

Commit

Permalink
update IOS action
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 3, 2024
1 parent 2608caf commit 8e36714
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 26 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build_apk.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,40 @@ jobs:
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_RELEASE: ${{ steps.build.outputs.SENTRY_RELEASE }}
SENTRY_DIST: ${{ steps.build.outputs.SENTRY_DIST }}
build_ios:
name: Build IOS Artifact
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.2'
cache: true
- name: Run build script
id: build
run: bash ${GITHUB_WORKSPACE}/Scripts/build.sh
working-directory: Scripts
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
IOS: true
- uses: actions/upload-artifact@v4
with:
path: |
build/ios/archive/
- name: Upload debug symbols
run: flutter packages pub run sentry_dart_plugin
if: github.event_name == 'push' || github.event_name == 'release'
continue-on-error: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
SENTRY_RELEASE: ${{ steps.build.outputs.SENTRY_RELEASE }}
SENTRY_DIST: ${{ steps.build.outputs.SENTRY_DIST }}
release-job:
name: Releasing
needs: build_android
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/build_ios.yml

This file was deleted.

12 changes: 10 additions & 2 deletions Scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ flutter gen-l10n
DEBUG=""
if [[ $GITHUB_EVENT_NAME == 'pull_request' ]]; then
DEBUG="--debug"
else
DEBUG="--release"
fi
dart run intl_translation:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/Frontend/intn_defs.dart lib/l10n/*.arb
flutter pub run build_runner build --delete-conflicting-outputs
if [[ ! -v SKIP_BUILD ]]; then
flutter build apk --split-debug-info=./symbols $DEBUG --build-number="$BUILD_NUMBER" --build-name="$VERSION"
flutter build appbundle --split-debug-info=./symbols --build-number="$BUILD_NUMBER" --build-name="$VERSION"

if [[ -v IOS ]]; then
flutter build ipa $DEBUG--no-codesign --build-number="$BUILD_NUMBER" --build-name="$VERSION"
else
flutter build apk --split-debug-info=./symbols $DEBUG --build-number="$BUILD_NUMBER" --build-name="$VERSION"
flutter build appbundle --split-debug-info=./symbols --build-number="$BUILD_NUMBER" --build-name="$VERSION"
fi

if [[ -v GITHUB_OUTPUT ]]; then
echo "SENTRY_DIST=$BUILD_NUMBER" >> "$GITHUB_OUTPUT"
echo "SENTRY_RELEASE=$VERSION" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 8e36714

Please sign in to comment.