Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Merge pull request #300 from nnsnodnb/dependabot/bundler/danger-9.4.0 #89

Merge pull request #300 from nnsnodnb/dependabot/bundler/danger-9.4.0

Merge pull request #300 from nnsnodnb/dependabot/bundler/danger-9.4.0 #89

Workflow file for this run

name: Deploy
on:
push:
branches:
- 'main'
tags:
- '*.*.*'
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true
cache-version: '1'
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.2.app/Contents/Developer
- name: Setup GoogleService-Info.plist
uses: DamianReeves/write-file-action@v1.2
with:
path: NowPlaying/Resources/Firebase/GoogleService-Info.plist
contents: |
${{ secrets.GOOGLE_SERVICE_INFO_PLIST }}
write-mode: overwrite
- name: Cache Swift Package Manager
uses: actions/cache@v3
with:
path: .swiftpm
key: ${{ runner.os }}-swiftpm-${{ hashFiles('NowPlaying.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: |
${{ runner.os }}-swiftpm-${{ hashFiles('NowPlaying.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
${{ runner.os }}-swiftpm-
- name: Archive & export NowPlaying.ipa for development
if: github.ref == 'refs/heads/main'
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_KEYCHAIN_NAME: "fastlane_keychain"
MATCH_KEYCHAIN_PASSWORD: ""
FASTLANE_XCODEBUILD_SETTINGS_RETRIES: 20
run: |
MATCH_GIT_PRIVATE_KEY=$(echo -n "${{ secrets.MATCH_GIT_PRIVATE_KEY }}" | base64 -d)
export MATCH_GIT_PRIVATE_KEY
bundle exec fastlane ios development
echo "app-distribution" > Products/destination.txt
tar -cvf Products.tar Products/
- uses: actions/upload-artifact@v3
with:
name: nowplaying-product
path: Products.tar
firebase-upload:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build
environment:
name: Firebase App Distribution
url: https://console.firebase.google.com/project/nowplayingios/appdistribution/app/ios:moe.nnsnodnb.NowPlaying/releases
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: nowplaying-product
path: /tmp/nowplaying-product
- name: Export products
run: |
tar -xf /tmp/nowplaying-product/Products.tar
- name: Seup app-distribution.json
uses: DamianReeves/write-file-action@v1.2
with:
path: /tmp/app-distribution.json
contents: |
${{ secrets.APP_DISTRIBUTION_JSON }}
write-mode: overwrite
- name: Upload to Firebase App Distribution
env:
GOOGLE_APPLICATION_CREDENTIALS: "/tmp/app-distribution.json"
run: |
yarn global add firebase-tools
RELEASE_NOTES="$(git log -1 --pretty=short)"
firebase \
appdistribution:distribute \
Products/NowPlaying.ipa \
--app "${{ secrets.FIREBASE_APP_ID }}" \
--groups default \
--release-notes "${RELEASE_NOTES}"